Mercurial > hg > index.cgi
changeset 469:9393a6b8886c
Fix PCR size guessing
When you want to determine if a value is between two other values, you use
*AND*, not OR. Duh.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 04 Mar 2018 10:24:58 -0700 |
parents | 7577bfee48bb |
children | 2c1c5dd84024 |
files | lwasm/insn_indexed.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lwasm/insn_indexed.c Thu Mar 01 21:31:50 2018 -0700 +++ b/lwasm/insn_indexed.c Sun Mar 04 10:24:58 2018 -0700 @@ -594,7 +594,7 @@ // Actual range is -128 <= offset <= 127; we're allowing a fudge // factor of 25 or so bytes so that we're less likely to accidentally // cross into the 16 bit boundary in weird corner cases. - if (v >= -100 || v <= 100) + if (v >= -100 && v <= 100) { l -> lint = 1; l -> pb = (l -> pb & 0x80) ? 0x9C : 0x8C;