From 320f4443ba6753d3a4587b4784c7b547f46b911f Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Wed, 1 Jan 2025 00:33:20 +0400 Subject: the length of the pushed string decremented by 1 --- src/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.go b/src/main.go index 3b7c0ce..9e61566 100644 --- a/src/main.go +++ b/src/main.go @@ -145,7 +145,7 @@ func parse(tokens[]Token) []Operation { } else if tokens[i].str[0] == '"' { op.name = "string" op.strData = tokens[i].str - op.intData = len(tokens[i].str) + op.intData = len(tokens[i].str) - 1 /* -2 for removing `"` at the beginning and include \n at the end */ op.label = fmt.Sprintf("string_%d", stringlabel) stringlabel++ } else if len(tokens[i].str) == 9 && tokens[i].str[:8] == "syscall." { -- cgit v1.2.3