aboutsummaryrefslogtreecommitdiff
path: root/vt.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-08-05 05:19:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-08-07 14:38:04 +0000
commitd00a2a222ef92a971e9dbc7dab4d2654399f7ac2 (patch)
tree03cd81a7f2cd01b00e8c5913d34b78fcb38cc744 /vt.c
parentrender: OSD: center text vertically (diff)
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
Diffstat (limited to 'vt.c')
-rw-r--r--vt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vt.c b/vt.c
index 772bd41f..f6e8b79b 100644
--- a/vt.c
+++ b/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;