summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-02-25 03:17:57 +0100
committerAhmad Fatoum <[email protected]>2018-02-25 03:17:57 +0100
commit80bf636f816058370d2d0b8295af3e89919c29e2 (patch)
treee3a44ceae865debbb7e9f5f23a9c6dfa2367a814 /src/text.c
parent76aca9b0d1f8409b055c858d0a9c5a9fff00d007 (diff)
downloadraylib-80bf636f816058370d2d0b8295af3e89919c29e2.tar.gz
raylib-80bf636f816058370d2d0b8295af3e89919c29e2.zip
Don't exceed signed int range when shifting left
Fixes UB in #489, found by UBSan.
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/text.c b/src/text.c
index 7f363b0a..d053be30 100644
--- a/src/text.c
+++ b/src/text.c
@@ -111,7 +111,7 @@ extern void UnloadDefaultFont(void);
// Load raylib default font
extern void LoadDefaultFont(void)
{
- #define BIT_CHECK(a,b) ((a) & (1 << (b)))
+ #define BIT_CHECK(a,b) ((a) & (1u << (b)))
// NOTE: Using UTF8 encoding table for Unicode U+0000..U+00FF Basic Latin + Latin-1 Supplement
// http://www.utf8-chartable.de/unicode-utf8-table.pl