Browse Source

Don't exceed signed int range when shifting left

Fixes UB in #489, found by UBSan.
pull/495/head
Ahmad Fatoum 6 years ago
parent
commit
80bf636f81
No known key found for this signature in database GPG Key ID: C3EAC3DE9321D59B
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/text.c

+ 1
- 1
src/text.c View File

@ -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

Loading…
Cancel
Save