summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-05-01 19:12:37 +0200
committerGitHub <noreply@github.com>2019-05-01 19:12:37 +0200
commitcef9a76c3ffaaf42bd9b85ff41afb0d9d45d05bc (patch)
tree45ed75981b198a52b447d6b58634d7a4d07a989e /src/stdafx.h
parent28b23a66437f5897841c7d9ccf6157c30ac9313a (diff)
downloadopenttd-cef9a76c3ffaaf42bd9b85ff41afb0d9d45d05bc.tar.xz
Fix #7553: check bounds when loading strings (#7554)
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index f85d68aa0..123dffa13 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -284,13 +284,15 @@
/* MSVCRT of course has to have a different syntax for long long *sigh* */
#if defined(_MSC_VER) || defined(__MINGW32__)
- #define OTTD_PRINTF64 "%I64d"
- #define OTTD_PRINTFHEX64 "%I64x"
- #define PRINTF_SIZE "%Iu"
+# define OTTD_PRINTF64 "%I64d"
+# define OTTD_PRINTFHEX64 "%I64x"
+# define PRINTF_SIZE "%Iu"
+# define PRINTF_SIZEX "%IX"
#else
- #define OTTD_PRINTF64 "%lld"
- #define OTTD_PRINTFHEX64 "%llx"
- #define PRINTF_SIZE "%zu"
+# define OTTD_PRINTF64 "%lld"
+# define OTTD_PRINTFHEX64 "%llx"
+# define PRINTF_SIZE "%zu"
+# define PRINTF_SIZEX "%zX"
#endif
typedef unsigned char byte;