mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -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
90ad3d6491
commit
12e0edd6e1
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;
|
new_key ^= new_wc;
|
||||||
|
|
||||||
/* Multiply with magic hash constant */
|
/* Multiply with magic hash constant */
|
||||||
new_key *= 2654435761;
|
new_key *= 2654435761ul;
|
||||||
|
|
||||||
/* And mask, to ensure the new value is within range */
|
/* And mask, to ensure the new value is within range */
|
||||||
new_key &= CELL_COMB_CHARS_HI - CELL_COMB_CHARS_LO;
|
new_key &= CELL_COMB_CHARS_HI - CELL_COMB_CHARS_LO;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue