FIx opFloatMessage string arg handling

Closes #129
This commit is contained in:
Alexander Batalov 2022-08-11 13:34:37 +03:00
parent 4ece7d1188
commit dcb53393c1
1 changed files with 5 additions and 1 deletions

View File

@ -3103,7 +3103,11 @@ static void _op_inven_cmds(Program* program)
static void opFloatMessage(Program* program) static void opFloatMessage(Program* program)
{ {
int floatingMessageType = programStackPopInteger(program); int floatingMessageType = programStackPopInteger(program);
char* string = programStackPopString(program); ProgramValue stringValue = programStackPopValue(program);
char* string = NULL;
if ((stringValue.opcode & VALUE_TYPE_MASK) == VALUE_TYPE_STRING) {
string = programGetString(program, stringValue.opcode, stringValue.integerValue);
}
Object* obj = static_cast<Object*>(programStackPopPointer(program)); Object* obj = static_cast<Object*>(programStackPopPointer(program));
int color = _colorTable[32747]; int color = _colorTable[32747];