shithub: femtolisp

Download patch

ref: 51fa9c06a52b80fb3fd952786aea48bb7acc19d2
parent: 7c5abbdf89e73bbdb60218da480bd3d2830cf7cb
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jan 12 17:44:04 EST 2025

OP_NUMEQ: this is supposed to be strictly numerical, leave it so

--- a/vm.inc
+++ b/vm.inc
@@ -672,18 +672,13 @@
 			i--;
 			b = FL(stack)[FL(sp)-i];
 			if(bothfixnums(a, b)){
-				if((fixnum_t)a != (fixnum_t)b){
+				if(a != b){
 					v = FL_f;
 					break;
 				}
-			}else{
-				x = numeric_compare(a, b, false, false, false);
-				if(x > 1)
-					x = numval(fl_compare(a, b));
-				if(x != 0){
-					v = FL_f;
-					break;
-				}
+			}else if(numeric_compare(a, b, true, false, false) != 0){
+				v = FL_f;
+				break;
 			}
 		}
 		POPN(n);