fix h2 jump offsets

This commit is contained in:
xensik 2022-07-19 13:48:08 +02:00
parent f6f958eb21
commit 4e2eeced30
2 changed files with 2 additions and 2 deletions

View File

@ -536,7 +536,7 @@ void assembler::assemble_offset(std::int32_t offset)
{
std::array<std::uint8_t, 4> bytes = {};
offset = (offset << 10) >> 8;
offset = (offset << 8) >> 8;
*reinterpret_cast<std::int32_t*>(bytes.data()) = offset;

View File

@ -450,7 +450,7 @@ auto disassembler::disassemble_offset() -> std::int32_t
auto offset = *reinterpret_cast<std::int32_t*>(bytes.data());
offset = (offset << 8) >> 10;
offset = (offset << 8) >> 8;
return offset;
}