From bccecc15b8f848027f379001af86ab8863910df3 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 18 May 2020 21:10:00 +0200 Subject: [PATCH] Fix debug --- hal/module.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/module.go b/hal/module.go index 8f33a12..86c84d9 100644 --- a/hal/module.go +++ b/hal/module.go @@ -28,7 +28,7 @@ func (h *Module) debug(format string, args ...interface{}) { if !h.debugEnabled { return } - fmt.Printf("[DEBUG] "+format, args...) + fmt.Printf("[DEBUG] "+format+"\n", args...) } func (h *Module) Step() { @@ -38,9 +38,9 @@ func (h *Module) Step() { return } h.debug("Instruction: %s", instruction.Instruction.Name) - h.debug("Accumulator before: %d", h.accumulator) + h.debug("Accumulator before: %f", h.accumulator) instruction.Execute(h) - h.debug("Accumulator after: %d", h.accumulator) + h.debug("Accumulator after: %f", h.accumulator) } func (h *Module) Run() error {