Fix function jumping bug (I think)

This commit is contained in:
2025-08-24 20:22:52 +10:00
parent 8da5a2bf93
commit e906734aca

View File

@@ -1851,9 +1851,8 @@ vector<Instruction> parser(vector<vector<string>> in) {
if (processingFunction) { if (processingFunction) {
functions[procFnName].localLabels[i.substr(1)] = functionInstructionIndex; functions[procFnName].localLabels[i.substr(1)] = functionInstructionIndex;
} else { } else {
labels[i.substr(1)] = lineNum; labels[i.substr(1)] = lineNum - 1;
} }
continue;
} }
else if (i == "stdin") newInst.inst = Instructions::Stdin; else if (i == "stdin") newInst.inst = Instructions::Stdin;
else if (i == "stdout") newInst.inst = Instructions::Stdout; else if (i == "stdout") newInst.inst = Instructions::Stdout;