small fix

This commit is contained in:
2026-07-16 19:29:02 +10:00
parent ba4121b6c4
commit be61ecec0f

View File

@@ -135,6 +135,7 @@ Program createProgramFromText(const char* input) {
case OP_IMM16: { case OP_IMM16: {
char* endptr; char* endptr;
instruction.immediate = strtol(buf, &endptr, 0); instruction.immediate = strtol(buf, &endptr, 0);
instruction.hasImm16 = true;
if (endptr == (char*)buf) { if (endptr == (char*)buf) {
fprintf(stderr, "couldn't convert %s to a number\n", buf); fprintf(stderr, "couldn't convert %s to a number\n", buf);
exit(1); exit(1);