changeset 106:1396fe221ff7

Set value type in correct location for int to float conversion
author William Astle <lost@l-w.ca>
date Mon, 30 Oct 2023 22:26:25 -0600
parents 65cb0a0297b3
children 1f2f6c2a1fde
files src/fps.s
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fps.s	Mon Oct 30 22:25:47 2023 -0600
+++ b/src/fps.s	Mon Oct 30 22:26:25 2023 -0600
@@ -935,7 +935,7 @@
                 dec fpa0+fpa.extra+4            ; done all digits?
                 bne fps_fromint1                ; brif not
                 lda #valtype_float              ; set result type to floating point
-                sta val.type,y
+                sta val.type,x
                 jsr fps_normalizea0             ; go normalize fpa0
                 jmp fps_pack0                   ; pack the result to the original accumulator
 ; This is the digit check for the double-dabble algorith. The left digit check is only concerned if the left digit