mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Fix badly freed pointer on indented code block after rept (#189)
This commit is contained in:
parent
fa9e004383
commit
529c14bfdc
1 changed files with 4 additions and 3 deletions
|
|
@ -979,10 +979,11 @@ static int eval_rept(yasm_preproc_gas *pp, int unused, const char *arg1)
|
|||
SLIST_INIT(&lines);
|
||||
|
||||
while (line) {
|
||||
skip_whitespace2(&line);
|
||||
if (starts_with(line, ".rept")) {
|
||||
char *line2 = line;
|
||||
skip_whitespace2(&line2);
|
||||
if (starts_with(line2, ".rept")) {
|
||||
nesting++;
|
||||
} else if (starts_with(line, ".endr") && --nesting == 0) {
|
||||
} else if (starts_with(line2, ".endr") && --nesting == 0) {
|
||||
for (i = 0; i < n; i++) {
|
||||
buffered_line *current_line;
|
||||
prev_bline = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue