diff options
| author | Michael Forney <[email protected]> | 2021-10-19 23:55:40 -0700 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-20 20:04:52 +1300 |
| commit | 7a5f42708b3b30bdfbc263db010832172d99a02d (patch) | |
| tree | 170ce7607596bf671d0db1e0ff1fda198b94018e /test/test.sh | |
| parent | d0bfca3339527c692831fc54c9b81bb24de59945 (diff) | |
Fix cut-off check for 1-byte jump offset
The size of a 1-byte jump is 2, so the offset to the end of a the
jump for a negative distance is `distance - 2`. Similarly, the size
of a 4-byte jump is 5 or 6, so the offset from the end of the 4-byte
jump is `distance - 5` or `distance - 6`.
Also, add an assert to make sure the offset really does fit in 1 byte.
Diffstat (limited to 'test/test.sh')
0 files changed, 0 insertions, 0 deletions
