Fix NULL pointer dereference bug.
authorShamus Hammons <jlhamm@acm.org>
Wed, 7 Oct 2015 16:53:50 +0000 (11:53 -0500)
committerShamus Hammons <jlhamm@acm.org>
Wed, 7 Oct 2015 16:53:50 +0000 (11:53 -0500)
riscasm.c
version.h

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");
                }
 
index 238c0ef17aea33482905bf412e3b2b3bb1c74264..43e200779dfd5f17827b23fbb45ce4a8a781c58a 100644 (file)
--- a/version.h
+++ b/version.h
@@ -13,6 +13,6 @@
 
 #define MAJOR   1              // Major version number
 #define MINOR   3              // Minor version number
-#define PATCH   10             // Patch release number
+#define PATCH   11             // Patch release number
 
 #endif // __VERSION_H__