Fix line advance DWARF opcodes when line advance is exactly 128
authorAndy Wingo <wingo@pobox.com>
Thu, 7 Nov 2013 10:10:36 +0000 (11:10 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 7 Nov 2013 10:10:36 +0000 (11:10 +0100)
* module/system/vm/assembler.scm (link-debug): Fix off-by-one error in
  which forward jumps of 128 were mis-rendered.

module/system/vm/assembler.scm

index 95e6c14..d6b417f 100644 (file)
@@ -1638,7 +1638,7 @@ it will be added to the GC roots at runtime."
 
   (define (put-sleb128 port val)
     (let lp ((val val))
-      (if (<= 0 (+ val 64) 128)
+      (if (<= 0 (+ val 64) 127)
           (put-u8 port (logand val #x7f))
           (begin
             (put-u8 port (logior #x80 (logand val #x7f)))