Commit 26ffe88
committed
Fix off-by-one error in unbounded byte update
The expression constructing individual elements within an array
comprehension did subtract the separately built first element, but
failed to consider that the index (and not number of elements) was being
used. Add 1 to the index to make it a "number of elements."
While at it, also fix typos in comments around this line of code.
Fixes: #58851 parent fa12ca7 commit 26ffe88
File tree
3 files changed
+25
-3
lines changed- regression/cbmc/byte_update15
- src/solvers/lowering
3 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | | - | |
| 1432 | + | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | | - | |
| 1480 | + | |
| 1481 | + | |
1481 | 1482 | | |
1482 | 1483 | | |
1483 | 1484 | | |
1484 | 1485 | | |
1485 | 1486 | | |
1486 | 1487 | | |
1487 | | - | |
| 1488 | + | |
1488 | 1489 | | |
1489 | 1490 | | |
1490 | 1491 | | |
| |||
0 commit comments