arkntools/arknights-toolbox

[Bug] Pasting a screenshot of the recruitment screen results in an error

Atulin opened this issue · 1 comments

Atulin commented

I'm pasting the following image:

The image

image

which results in nothing being picked up by the app and an error thrown to the browser console.

Console output with local OCR enabled:

OCR ["N","N","V","vV","Sniper","Caster","Vanguard","DP-Recovery","Debuff","G"] Hr.vue:719

Uncaught (in promise) SyntaxError: invalid range in character class
    OCRBlackCharRegexp Hr.vue:494
    VueJS 3
        get
        evaluate
        qo
    r Hr.vue:722
    a Hr.vue:722
    Babel 9
        h
        E
        x
        n
        s
        promise callback*n
        s
        i
        i
    OCR Hr.vue:713
    a Hr.vue:704
    Babel 7
        h
        E
        x
        n
        s
        i
        i
    handleFilesOCR Hr.vue:699
    VueJS 2
        Un
        $emit
    pasteHandler PasteCapturer.vue:46
    paste PasteCapturer.vue:1
    VueJS 3
        Un
        n
        _wrapper
Hr.vue:494
    Babel 6
        n
        s
        (Async: promise callback)
    n
        s
        i
        i
    OCR Hr.vue:713
    a Hr.vue:704
    Babel 7
        h
        E
        x
        n
        s
        i
        i
    handleFilesOCR Hr.vue:699
    VueJS 2
        Un
        $emit
    pasteHandler PasteCapturer.vue:46
    paste PasteCapturer.vue:1
    VueJS 3
        Un
        n
        _wrapper

And with local OCR disabled:

OCR ["81","Instruction>","Recruitment","Time","Job Tags","(Max: 3)","Cost","09","Sniper","DP-Recnvery","65158","Vanguard","4680","14685","Caster","Debuff","Refræh | '3 Ø2:26:Ø2 Contacting•","* Possible Rarity","Tap to Refresh"] Hr.vue:719

Uncaught (in promise) SyntaxError: invalid range in character class
    OCRBlackCharRegexp Hr.vue:494
    VueJS 3
        get
        evaluate
        qo
    r Hr.vue:722
    a Hr.vue:722
    Babel 9
        h
        E
        x
        n
        s
        promise callback*n
        s
        i
        i
    OCR Hr.vue:713
    a Hr.vue:704
    Babel 7
        h
        E
        x
        n
        s
        i
        i
    handleFilesOCR Hr.vue:699
    VueJS 2
        Un
        $emit
    pasteHandler PasteCapturer.vue:46
    paste PasteCapturer.vue:1
    VueJS 3
        Un
        n
        _wrapper

Fixed, thanks for your report.