From f03f7bdacc343a9e2c3a84efaa940834f1c298c0 Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Mon, 24 Apr 2023 16:08:05 +0300 Subject: [PATCH] Fix ProgramValue for strings --- src/interpreter.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interpreter.cc b/src/interpreter.cc index e7ad993..a5158a7 100644 --- a/src/interpreter.cc +++ b/src/interpreter.cc @@ -3333,12 +3333,12 @@ bool ProgramValue::operator<(ProgramValue const& other) const } switch (opcode) { - case VALUE_TYPE_DYNAMIC_STRING: + case VALUE_TYPE_INT: case VALUE_TYPE_STRING: + case VALUE_TYPE_DYNAMIC_STRING: + return integerValue < other.integerValue; case VALUE_TYPE_PTR: return pointerValue < other.pointerValue; - case VALUE_TYPE_INT: - return integerValue < other.integerValue; case VALUE_TYPE_FLOAT: return floatValue < other.floatValue; default: @@ -3353,12 +3353,12 @@ bool ProgramValue::operator==(ProgramValue const& other) const } switch (opcode) { - case VALUE_TYPE_DYNAMIC_STRING: + case VALUE_TYPE_INT: case VALUE_TYPE_STRING: + case VALUE_TYPE_DYNAMIC_STRING: + return integerValue == other.integerValue; case VALUE_TYPE_PTR: return pointerValue == other.pointerValue; - case VALUE_TYPE_INT: - return integerValue == other.integerValue; case VALUE_TYPE_FLOAT: return floatValue == other.floatValue; default: