diff options
author | Thierry Crozat | 2017-10-06 00:57:41 +0100 |
---|---|---|
committer | Thierry Crozat | 2017-10-06 01:01:16 +0100 |
commit | 51df06523e41d1487b8b36c840509e4627363c7b (patch) | |
tree | a1c5eb96312587af354d9398a543a6fd361e28be /engines | |
parent | 99abd640c82d47b6b0fd11267eec18fa528f0a0b (diff) | |
download | scummvm-rg350-51df06523e41d1487b8b36c840509e4627363c7b.tar.gz scummvm-rg350-51df06523e41d1487b8b36c840509e4627363c7b.tar.bz2 scummvm-rg350-51df06523e41d1487b8b36c840509e4627363c7b.zip |
KYRA: Fix undefined behaviour in variadic functions
Passing a type that undergoes default argument promotion as last
argument of a variadic function results in undefined behaviour.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/screen_lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/screen_lol.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index 6dd6080923..2531cb4cb1 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -54,7 +54,7 @@ Screen_LoL::~Screen_LoL() { delete[] _grayOverlay; } -void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint16 flags, ...) { +void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint flags, ...) { if (!format) return; @@ -90,7 +90,7 @@ void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint printText(string, x, y, col1, col2); } -void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint16 flags, ...) { +void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint flags, ...) { char buffer[400]; va_list args; diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h index 91d663d34f..49c6f90168 100644 --- a/engines/kyra/screen_lol.h +++ b/engines/kyra/screen_lol.h @@ -36,8 +36,8 @@ public: Screen_LoL(LoLEngine *vm, OSystem *system); ~Screen_LoL(); - void fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint16 flags, ...) GCC_PRINTF(2, 8); - void fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint16 flags, ...) GCC_PRINTF(2, 9); + void fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint flags, ...) GCC_PRINTF(2, 8); + void fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint flags, ...) GCC_PRINTF(2, 9); void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2); |