From 9585451aa52259a577dabfd5bfab058a54a8dcfc Mon Sep 17 00:00:00 2001 From: lyon1998 Date: Tue, 19 Apr 2022 19:19:18 +0800 Subject: [PATCH] fix \x33 --- src/PikaVM.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PikaVM.c b/src/PikaVM.c index ac7fb1df2..ebf52f8da 100644 --- a/src/PikaVM.c +++ b/src/PikaVM.c @@ -425,9 +425,9 @@ static Arg* VM_instruction_handler_STR(PikaObj* self, VMState* vs, char* data) { /* eg. replace '\x33' to '3' */ if ((data[i] == '\\') && (data[i + 1] == 'x')) { char hex_str[] = "0x00"; - hex_str[2] = data[i + 3]; - hex_str[3] = data[i + 4]; - char hex = (char)strtol(hex_str, NULL, 0) + '0'; + hex_str[2] = data[i + 2]; + hex_str[3] = data[i + 3]; + char hex = (char)strtol(hex_str, NULL, 0); transfered_str[i_out++] = hex; i += 3; continue;