Skip to content

Error in value of string contants containing \a5C #1198

@eh-adblockplus-org

Description

@eh-adblockplus-org

Test f0 fails (string length is 1) and test f2 throws an index out of bounds exception. What's not obvious from the way the test is written is that \a5C is the backslash character.

str foo = "\a5C\a5D";
test bool f0() = size(foo) == 2;
test bool f1() = foo[0] == "\a5C";
test bool f2() = foo[1] == "\a5D";

str bar = "\a5C" + "\a5D";
test bool b0() = size(bar) == 2;
test bool b1() = bar[0] == "\a5C";
test bool b2() = bar[1] == "\a5D";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions