From 4f616021f3e3dbee45fc1bc1704a8d7e8e334b04 Mon Sep 17 00:00:00 2001 From: barant Date: Thu, 9 Jan 2025 09:16:34 -0800 Subject: [PATCH] fixed if conditionals. --- __if.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__if.cpp b/__if.cpp index 84451d4..fc270e7 100644 --- a/__if.cpp +++ b/__if.cpp @@ -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)) ||