Commit c01e6f9d authored by Raymond Toy's avatar Raymond Toy
Browse files

Make :plus-integer actually print + or - as documented.

The comment says the field should be proceeded with a + or -, but
depended on negative integers producing the needed -.  When
disassembling with a radix, this doesn't produce the expected output
(#x7 vs #x-7 vs -#x7). So really print + or - followed by the absolute
value.
parent eee2366d
......@@ -952,13 +952,14 @@
((eq (car source) :plus-integer)
;; prints the given field proceed with a + or a -
(let ((form
(arg-value-form (arg-or-lose (cadr source) funstate)
funstate
:numeric)))
(arg-value-form (arg-or-lose (cadr source) funstate)
funstate
:numeric)))
`(progn
(when (>= ,form 0)
(local-write-char #\+))
(local-princ ,form))))
(if (>= ,form 0)
(local-write-char #\+)
(local-write-char #\-))
(local-princ (abs ,form)))))
((eq (car source) 'quote)
`(local-princ ,source))
((eq (car source) 'function)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment