We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ca97e4 commit 841bbb8Copy full SHA for 841bbb8
src/engine/virtualmachine_p.cpp
@@ -653,12 +653,14 @@ do_list_get_item : {
653
654
do_str_at : {
655
size_t index = READ_REG(1, 2)->toLong() - 1;
656
- std::u16string str = READ_REG(0, 2)->toUtf16();
657
- if (index < 0 || index >= str.size())
658
- REPLACE_RET_VALUE("", 2);
659
- else
660
- REPLACE_RET_VALUE(utf8::utf16to8(std::u16string({ str[index] })), 2);
661
- FREE_REGS(1);
+ {
+ std::u16string str = READ_REG(0, 2)->toUtf16();
+ if (index < 0 || index >= str.size())
+ REPLACE_RET_VALUE("", 2);
+ else
+ REPLACE_RET_VALUE(utf8::utf16to8(std::u16string({ str[index] })), 2);
662
+ FREE_REGS(1);
663
+ }
664
DISPATCH();
665
}
666
0 commit comments