Apply patch from BR 890790
authorVictor van den Elzen <victor.vde@gmail.com>
Wed, 1 Oct 2008 11:08:50 +0000 (13:08 +0200)
committerVictor van den Elzen <victor.vde@gmail.com>
Wed, 1 Oct 2008 11:09:27 +0000 (13:09 +0200)
preproc.c
test/br890790.asm [new file with mode: 0755]
test/br890790_i.asm [new file with mode: 0755]

index 90a62e6..e5b5ab3 100644 (file)
--- a/preproc.c
+++ b/preproc.c
@@ -4412,6 +4412,8 @@ static char *pp_getline(void)
                 nasm_free(i);
                 if (!istk)
                     return NULL;
+                if (istk->expansion && istk->expansion->finishes)
+                    break;
             }
         }
 
diff --git a/test/br890790.asm b/test/br890790.asm
new file mode 100755 (executable)
index 0000000..9a3d628
--- /dev/null
@@ -0,0 +1,7 @@
+;Testname=test; Arguments=-fbin -obr890790.bin; Files=.stdout .stderr br890790.bin
+%rep 5
+  db 0
+  %include "br890790_i.asm"
+%endrep
+
+db 1
diff --git a/test/br890790_i.asm b/test/br890790_i.asm
new file mode 100755 (executable)
index 0000000..7ff797f
--- /dev/null
@@ -0,0 +1 @@
+db 2