mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-08 20:38:15 +00:00
Don't exceed signed int range when shifting left
Fixes UB in #489, found by UBSan.
This commit is contained in:
@@ -111,7 +111,7 @@ extern void UnloadDefaultFont(void);
|
|||||||
// Load raylib default font
|
// Load raylib default font
|
||||||
extern void LoadDefaultFont(void)
|
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
|
// 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
|
// http://www.utf8-chartable.de/unicode-utf8-table.pl
|
||||||
|
Reference in New Issue
Block a user