]> Shamusworld >> Repos - rmac/blobdiff - riscasm.c
Fix NULL pointer dereference bug.
[rmac] / riscasm.c
index 23faaee7120df76cc71cc95dadce3de262f4cf1c..78bae9c290a3f506088050a3644de1546e4fe142 100644 (file)
--- a/riscasm.c
+++ b/riscasm.c
@@ -328,7 +328,7 @@ int GenerateRISCCode(int state)
                {
                        sy = lookup(string[tok[1]], LABEL, 0);
 
-                       if (sy->sattre & EQUATEDREG)
+                       if (sy && (sy->sattre & EQUATEDREG))
                                return error("equated register in 1st operand of MOVEI instruction");
                }