summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-01-01 00:33:20 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-01-01 00:33:20 +0400
commit320f4443ba6753d3a4587b4784c7b547f46b911f (patch)
treecfc689e645eb1e7d84b06416ed5cb6879976d230 /src
parenteb9fab2b0e9124ab0c9ef9091dfb2950f2857be2 (diff)
the length of the pushed string decremented by 1
Diffstat (limited to 'src')
-rw-r--r--src/main.go2
1 files changed, 1 insertions, 1 deletions
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." {