mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Don't guess about the size of an int, assert it!
This commit is contained in:
parent
32fd1878a0
commit
d658ef6627
1 changed files with 2 additions and 1 deletions
|
|
@ -23,8 +23,9 @@
|
|||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#undef INT_MAX
|
||||
#ifndef INT_MAX
|
||||
// Make a lucky guess.
|
||||
SDL_COMPILE_TIME_ASSERT(int_size, sizeof(int) == sizeof(Sint32));
|
||||
#define INT_MAX SDL_MAX_SINT32
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue