Skip to content

Wrongly converted error messages #26

@drinking-code

Description

@drinking-code

So, I got a weird error:
Bildschirmfoto 2020-09-20 um 18 12 51 101,110,100,32,112,97,116,116,101,114,110,32,119,105,116,104,32,117,110,109,97,116,99,104,101,100,32,112,97,114,101,110,116,104,101,115,105,115.
After some tinkering I found out that if converted to hex and then to utf-8 characters it spells "end pattern with unmatched parenthesis".

That means that probably the convertUTF8BytesFromPtrToString function doesn't work properly and converts bytes to decimal numbers instead of utf8 characters.https://github.com/NeekSandhu/onigasm/blob/cf4da28454f09a2ff74f1c008b3d619218ca2dbe/src/OnigScanner.ts#L42

To recreate, use the OnigScanner with a pattern that has a capturing group missing the closing brackets. e.g. (\s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions