about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-02-16 20:14:32 -0800
committerKartik Agaram <vc@akkartik.com>2020-02-16 20:14:32 -0800
commitdf781efa7db58e5cc7f81d7261929a4fbd956d94 (patch)
treefeea0b3ba5fe9c8d7df21ec04d518689a1a6b838
parentd2316e415bafef334cf1e6cca32955d10f07ce3a (diff)
downloadmu-df781efa7db58e5cc7f81d7261929a4fbd956d94.tar.gz
6011
-rwxr-xr-xapps/mubin133440 -> 133450 bytes
-rw-r--r--apps/mu.subx8
2 files changed, 3 insertions, 5 deletions
diff --git a/apps/mu b/apps/mu
index c11ce01e..29e0f145 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --git a/apps/mu.subx b/apps/mu.subx
index 8765e5f9..c87fd16d 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -2090,11 +2090,9 @@ $parse-var-with-type:save-register:
     # if (!slice-empty?(s)) v->register = slice-to-string(s)
     {
 $parse-var-with-type:write-register:
-      # HACK: s->end can be less than s->start with all the decrements above
-      # That's probably a sign we have the wrong algorithm for this function.
-      8b/-> *ecx 0/r32/eax
-      39/compare *(ecx+4) 0/r32/eax  # Slice-end
-      76/jump-if-<= break/disp8
+      (slice-empty? %ecx)  # => eax
+      3d/compare-eax-and 0/imm32/false
+      75/jump-if-!= break/disp8
       (slice-to-string Heap %ecx)
       89/<- *(edi+0x10) 0/r32/eax  # Var-register
     }