diff options
-rw-r--r-- | src/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.go b/src/main.go index 143b165..bbf5682 100644 --- a/src/main.go +++ b/src/main.go @@ -283,7 +283,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) - 1 /* -2 for removing `"` at the beginning and include \n at the end */ + op.intData = len(tokens[i].str) - 2 /* -2 for removing `"` at the beginning and at the end */ op.label = fmt.Sprintf("string_%d", stringlabel) stringlabel++ } else if len(tokens[i].str) == 9 && tokens[i].str[:8] == "syscall." { @@ -584,7 +584,7 @@ func generateX86_64(ops[] Operation, w io.Writer) { fmt.Fprintf(w, "section .data\n") for i := 0; i < len(strings); i++ { - fmt.Fprintf(w, "%s: db %s, 10\n", strings[i][1], strings[i][0]) + fmt.Fprintf(w, "%s: db %s\n", strings[i][1], strings[i][0]) } } |