From fe0f793d10f3e2db6e5b4361d192fd321c1ed701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xenxo=20Espasand=C3=ADn?= Date: Fri, 12 Jan 2024 20:38:20 +0100 Subject: [PATCH] fix(map): misalign (#180) --- src/arc/assembler.cpp | 4 ++-- src/gsc/assembler.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arc/assembler.cpp b/src/arc/assembler.cpp index 2e258c02..f0df35c3 100644 --- a/src/arc/assembler.cpp +++ b/src/arc/assembler.cpp @@ -278,11 +278,11 @@ auto assembler::assemble_function(function& func) -> void auto assembler::assemble_instruction(instruction const& inst) -> void { - devmap_count_++; + script_.write(static_cast(ctx_->opcode_id(inst.opcode))); devmap_.write(script_.pos()); devmap_.write(inst.pos.line); devmap_.write(inst.pos.column); - script_.write(static_cast(ctx_->opcode_id(inst.opcode))); + devmap_count_++; switch (inst.opcode) { diff --git a/src/gsc/assembler.cpp b/src/gsc/assembler.cpp index 27f652d0..731087bd 100644 --- a/src/gsc/assembler.cpp +++ b/src/gsc/assembler.cpp @@ -69,11 +69,11 @@ auto assembler::assemble_function(function const& func) -> void auto assembler::assemble_instruction(instruction const& inst) -> void { - devmap_count_++; + script_.write(ctx_->opcode_id(inst.opcode)); devmap_.write(script_.pos()); devmap_.write(inst.pos.line); devmap_.write(inst.pos.column); - script_.write(ctx_->opcode_id(inst.opcode)); + devmap_count_++; switch (inst.opcode) {