fix(map): misalign (#180)

This commit is contained in:
Xenxo Espasandín 2024-01-12 20:38:20 +01:00 committed by GitHub
parent 638ff54d93
commit fe0f793d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -278,11 +278,11 @@ auto assembler::assemble_function(function& func) -> void
auto assembler::assemble_instruction(instruction const& inst) -> void
{
devmap_count_++;
script_.write<u8>(static_cast<u8>(ctx_->opcode_id(inst.opcode)));
devmap_.write<u32>(script_.pos());
devmap_.write<u16>(inst.pos.line);
devmap_.write<u16>(inst.pos.column);
script_.write<u8>(static_cast<u8>(ctx_->opcode_id(inst.opcode)));
devmap_count_++;
switch (inst.opcode)
{

View File

@ -69,11 +69,11 @@ auto assembler::assemble_function(function const& func) -> void
auto assembler::assemble_instruction(instruction const& inst) -> void
{
devmap_count_++;
script_.write<u8>(ctx_->opcode_id(inst.opcode));
devmap_.write<u32>(script_.pos());
devmap_.write<u16>(inst.pos.line);
devmap_.write<u16>(inst.pos.column);
script_.write<u8>(ctx_->opcode_id(inst.opcode));
devmap_count_++;
switch (inst.opcode)
{