mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
vt: fix ASAN UB warning
../vt.c:648:13: runtime error: signed integer overflow: 3924432811 * 2654435761 cannot be represented in type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../vt.c:648:13 in Closes #1456
This commit is contained in:
parent
a3d54614c7
commit
d00a2a222e
1 changed files with 1 additions and 1 deletions
2
vt.c
2
vt.c
|
|
@ -645,7 +645,7 @@ chain_key(uint32_t old_key, uint32_t new_wc)
|
|||
new_key ^= new_wc;
|
||||
|
||||
/* Multiply with magic hash constant */
|
||||
new_key *= 2654435761;
|
||||
new_key *= 2654435761ul;
|
||||
|
||||
/* And mask, to ensure the new value is within range */
|
||||
new_key &= CELL_COMB_CHARS_HI - CELL_COMB_CHARS_LO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue