From 5586eec3816e56430f02418404a415fdae3f2d57 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Wed, 10 Apr 2019 00:09:23 +0200 Subject: [PATCH] Fix number format bug for program-memory declarations --- microcompiler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microcompiler.kt b/microcompiler.kt index 3f2406c..4921ba6 100644 --- a/microcompiler.kt +++ b/microcompiler.kt @@ -415,7 +415,7 @@ fun main(args: Array){ val constant = substr.substring(substr.indexOf(" ") + 1).replace(" ", "").replace("\t", "") try{ - println("@0x${readNumber(address, 255)}\n${readNumber(constant, 65535).or(1 shl 30).toString(16).substring(4)}") + println("@0x${readNumber(address, 255).toString(16)}\n${readNumber(constant, 65535).or(1 shl 30).toString(16).substring(4)}") }catch(e: NumberFormatException){ err() }