1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-02 00:41:42 +00:00

- Fixed problem when referenced constant name in the asm is part of a smaller constant declared outside of the asm. Each referenced constant in the asm must start with the constant name, and can never be in the middle of the operand.

This commit is contained in:
Flight_Control 2023-03-21 14:58:49 +01:00
parent 64d30faf9c
commit db6adeec05

View File

@ -935,8 +935,10 @@ public class Pass4CodeGeneration {
String replace = referenced.get(reference).getLocalName();
if(operand.startsWith(replace)) {
} else {
operand = operand.replaceAll(reference, replace);
asmInstruction.setOperand1(operand);
if(operand.startsWith(reference)) {
operand = operand.replaceAll(reference, replace);
asmInstruction.setOperand1(operand);
}
}
}
}