Skip to content

Commit 924ca95

Browse files
committed
Fix type conversion in OP_STR_AT
1 parent c849bf2 commit 924ca95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/virtualmachine_p.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ do_list_get_item : {
647647
DISPATCH();
648648

649649
do_str_at:
650-
REPLACE_RET_VALUE(READ_REG(0, 2)->toUtf16()[READ_REG(1, 2)->toLong()], 2);
650+
REPLACE_RET_VALUE(utf8::utf16to8(std::u16string({ READ_REG(0, 2)->toUtf16()[READ_REG(1, 2)->toLong() - 1] })), 2);
651651
FREE_REGS(1);
652652
DISPATCH();
653653

0 commit comments

Comments
 (0)