Commit 0b60604
committed
grt: use uint32_t for the packed coordinate dedup key
The packed (x,y) key shifted a uint16_t left by 16 into a signed int32_t,
which is undefined when the high coordinate has bit 15 set (value >= 2^31).
Use an unsigned 32-bit key (map and pack) to make the shift well-defined.
No behavior change: the same distinct keys and first-match aliasing;
140/140 grt tests pass with byte-identical routing.
Signed-off-by: Saurav Singh <saurav.singh@fermions.co>1 parent 06b486f commit 0b60604
2 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3018 | 3018 | | |
3019 | 3019 | | |
3020 | 3020 | | |
3021 | | - | |
3022 | | - | |
3023 | | - | |
3024 | | - | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
3025 | 3026 | | |
3026 | 3027 | | |
3027 | 3028 | | |
| |||
0 commit comments