@miconda The patch really fixes the bug described in the commit message. The if() condition protects against crash. But the side-effect was that all characters >=0x80 that got sign extended were rejected by the guard. In real life this caused the problem not to be able match utf-8 strings with non-ascii characters.