mirror of
https://github.com/KarolS/millfork.git
synced 2024-09-10 11:54:30 +00:00
Fix emitting constant decimal expressions
This commit is contained in:
parent
da023daadc
commit
be04c9b195
@ -153,7 +153,7 @@ abstract class AbstractAssembler[T <: AbstractCode](private val program: Program
|
|||||||
var result = 0L
|
var result = 0L
|
||||||
var multiplier = 1L
|
var multiplier = 1L
|
||||||
while (x > 0) {
|
while (x > 0) {
|
||||||
result += multiplier * (a % 16L)
|
result += multiplier * (x % 16L)
|
||||||
x /= 16L
|
x /= 16L
|
||||||
multiplier *= 10L
|
multiplier *= 10L
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ abstract class AbstractAssembler[T <: AbstractCode](private val program: Program
|
|||||||
var result = 0L
|
var result = 0L
|
||||||
var multiplier = 1L
|
var multiplier = 1L
|
||||||
while (x > 0) {
|
while (x > 0) {
|
||||||
result += multiplier * (a % 10L)
|
result += multiplier * (x % 10L)
|
||||||
x /= 10L
|
x /= 10L
|
||||||
multiplier *= 16L
|
multiplier *= 16L
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user