Skip to content

Commit

Permalink
Encode SlaSpace wordsize as unsigned integer
Browse files Browse the repository at this point in the history
This patch corrects a mismatch between the encoder and decoder in
wordsize signedness.
  • Loading branch information
mborgerson committed Jun 11, 2024
1 parent ebfd108 commit 31ab375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ghidra/Features/Decompiler/src/decompile/cpp/sleighbase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void SleighBase::encodeSlaSpace(Encoder &encoder,AddrSpace *spc) const
// encoder.writeSignedInteger(sla::ATTRIB_DEADCODEDELAY, spc->getDeadcodeDelay());
encoder.writeSignedInteger(sla::ATTRIB_SIZE, spc->getAddrSize());
if (spc->getWordSize() > 1)
encoder.writeSignedInteger(sla::ATTRIB_WORDSIZE, spc->getWordSize());
encoder.writeUnsignedInteger(sla::ATTRIB_WORDSIZE, spc->getWordSize());
encoder.writeBool(sla::ATTRIB_PHYSICAL, spc->hasPhysical());
if (spc->getType() == IPTR_INTERNAL)
encoder.closeElement(sla::ELEM_SPACE_UNIQUE);
Expand Down

0 comments on commit 31ab375

Please sign in to comment.