agssim: fix bugs emitting strings with a size divisible by 4
commit596d5bc9d24ca9c4e2f7f38f79f7aa9c3996f3e6
authorrofl0r <rofl0r@users.noreply.github.com>
Sat, 14 Dec 2019 02:37:43 +0000 (14 02:37 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Sat, 14 Dec 2019 02:37:43 +0000 (14 02:37 +0000)
tree97e7222931fbd94607268804b96f355a4ee21b41
parentd109fc3b3a36762b1fcce148bf5220c74c8aea66
agssim: fix bugs emitting strings with a size divisible by 4

the loop writes only l-1 bytes to keep the trailing '"' character
away, but intended to write (at least) one more nul byte to zero-
terminate the string. thus in case of l==0 the loop needs to run
another time. failure to do so causes a non-zero terminated string
and a mismatch between the size calculated for the jump and the
number of bytes actually written, which cause the jump to end up
in the middle of the string.
agssim.c