diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-09-03 17:56:06 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-09-03 17:56:06 +0200 |
commit | 2e59b606d59c1da311d856c33bf5494c1ef3d31b (patch) | |
tree | e6c8ea8dbe2224e675763c5478776000c369a7ee | |
parent | c3c19f3220485af12c3a5561ad1754bf546e7429 (diff) |
Fix data corruption bug in getc
-rw-r--r-- | liblang.asm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/liblang.asm b/liblang.asm index 8502d55..ecb1010 100644 --- a/liblang.asm +++ b/liblang.asm @@ -153,13 +153,13 @@ getc: push r11 mov eax, SYS_READ mov edi, STDIN_FILENO - mov rsi, rsp + lea rsi, [rsp-1] mov edx, 1 syscall cmp rax, 1 jne .fail xor eax, eax - mov al, [rsp] + mov al, [rsp-1] .finish: pop r11 pop rcx |