Commit ad87202
committed
preproc: don't unmacro if macro cannot be found.
This commit adds a check to see if the macro that we want to unmacro exists.
A previous commit, introduced a check to see if the unmacro was undefining a macro being expanded, but that same check included a null pointer dereference if the macro to undefine did not exist.
The following code reproduced the issue:
```asm
%macro baz 0
%unmacro F 0
%endmacro
baz
```
Compile with:
```shell
$ nasm -f elf64 -g -FDWARF -o tmp.o -werror file.asm
```
Fixes bug 33927611 parent e2ed7b7 commit ad87202
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4330 | 4330 | | |
4331 | 4331 | | |
4332 | 4332 | | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
4333 | 4338 | | |
4334 | 4339 | | |
4335 | 4340 | | |
| |||
0 commit comments