Merge pull request #18 from jblume/master

Fix incorrect displacement with bound labels for X64
This commit is contained in:
Petr Kobalicek
2014-04-16 21:23:39 +02:00

View File

@@ -3340,7 +3340,7 @@ _EmitSib:
if (label->offset != -1) { if (label->offset != -1) {
// Bound label. // Bound label.
dispOffset += static_cast<int32_t>((intptr_t)(cursor - self->_buffer) - label->offset); dispOffset += label->offset - static_cast<int32_t>((intptr_t)(cursor - self->_buffer));
EMIT_DWORD(static_cast<int32_t>(dispOffset)); EMIT_DWORD(static_cast<int32_t>(dispOffset));
} }
else { else {