Mercurial > hg-old > index.cgi
changeset 69:b7550988b97c
Fixed missing NUL on macro lines
author | lost |
---|---|
date | Tue, 06 Jan 2009 04:36:41 +0000 |
parents | cef25b0088e6 |
children | 8aa6a28cba02 |
files | src/macro.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macro.c Mon Jan 05 06:14:41 2009 +0000 +++ b/src/macro.c Tue Jan 06 04:36:41 2009 +0000 @@ -120,7 +120,7 @@ { if (*loc == *len) { - *buff = realloc(*buff, *len + 32); + *buff = lwasm_realloc(*buff, *len + 32); *len += 32; } (*buff)[(*loc)++] = c; @@ -210,6 +210,14 @@ } } + { + int i; + for (i = 0; i < nargs; i++) + { + debug_message(10, "Macro (%s) arg %d: %s", m -> name, i + 1, args[i]); + } + } + // step 2: iterate over the lines if (as -> passnum == 2) { @@ -302,6 +310,8 @@ } } + macro_add_to_buff(&linebuff, &bloc, &blen, 0); + nl -> text = linebuff; lwasm_parse_line(as, nl);