fixed if conditionals.

This commit is contained in:
barant 2025-01-09 09:16:34 -08:00
parent b65d8d4396
commit 4f616021f3

View File

@ -24,7 +24,8 @@ namespace jet {
(type != "gt") &&
(type != "ge"))
throw coreutils::Exception("type value must be 'eq','ne','lt','le','gt','ge'.");
int rc = keywords[resolveKeyword("value1")].compare(keywords[resolveKeyword("value2")]);
int rc = resolveKeyword("value1").compare(resolveKeyword("value2"));
std::cout << "if: " << resolveKeyword("value1") << " " << type << " " << resolveKeyword("value2") << ":" << rc << std::endl;
if(((type == "eq") && (rc == 0)) ||
((type == "ne") && (rc != 0)) ||
((type == "lt") && (rc == -1)) ||