From ea6851e4d007a468ff1af7fb3a72eddd21a52a9e Mon Sep 17 00:00:00 2001 From: avolkov Date: Wed, 9 Feb 2005 22:56:37 +0000 Subject: [PATCH] Fixed MAX_CHARS define to prevent overflows during casts git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1527 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/graphics/font.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sc2/src/sc2code/libs/graphics/font.h b/sc2/src/sc2code/libs/graphics/font.h index b14e4c420..c1875328e 100644 --- a/sc2/src/sc2code/libs/graphics/font.h +++ b/sc2/src/sc2code/libs/graphics/font.h @@ -20,7 +20,10 @@ #define _FONT_H #define FIRST_CHAR (UNICODE)' ' -#define MAX_CHARS 5000 +// keep MAX_CHARS under 256 for now +#define MAX_CHARS 255 + // MAX_CHARS gets cast to UNICODE in a few places and is used in math + // UNICODE is defined to BYTE, all strings attached #define MAX_DELTAS 100 typedef struct