about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/apps/survey.subx5
1 files changed, 3 insertions, 2 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index 31b98e6a..04056762 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -354,6 +354,7 @@ compute-offsets:  # in : (address buffered-file), segments : (address stream {st
     #       if slice-starts-with?(word-slice, "#")  # comment
     #         continue
     #       if is-label?(word-slice)
+    #         strip trailing ':' from word-slice
     #         x : (address label-info) = get-or-insert(labels, name)
     #         x->segment-offset = segment-offset
     #         trace("label '", word-slice, "' is in segment '", curr-segment-name, "'")
@@ -465,8 +466,8 @@ $compute-offsets:label:
     # . if (EAX == 0) goto next check
     3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $compute-offsets:segment/disp8
-    # word-slice->end--
-    ff          1/subop/dec        1/mod/*+disp8    2/rm32/EDX    .           .             .           .           4/disp8         .                 # decrement *(EDX+4)
+    # strip trailing ':' from word-slice
+    ff          1/subop/decrement   1/mod/*+disp8   2/rm32/EDX    .           .             .           .           4/disp8         .                 # decrement *(EDX+4)
     # x/EAX = get-or-insert-slice(labels, word-slice)
     # . . push args
     68/push  0x10/imm32/row-size