Browse code

Stopped matching non-opcode tokens that start with an opcode.

Andrew Alderwick authored on 26/03/2021 20:16:14
Showing 1 changed files
... ...
@@ -155,8 +155,8 @@ findopcode(char *s)
155 155
 			continue;
156 156
 		while(s[3 + m]) {
157 157
 			if(s[3 + m] == '2') i |= (1 << 5); /* mode: short */
158
-			if(s[3 + m] == 'r') i |= (1 << 6); /* mode: return */
159
-			if(s[3 + m] == '?') return 0;      /* forget that conditionals exist */
158
+			else if(s[3 + m] == 'r') i |= (1 << 6); /* mode: return */
159
+			else return 0; /* failed to match */
160 160
 			m++;
161 161
 		}
162 162
 		return i;