diff options
author | Thierry Crozat | 2017-10-06 01:00:02 +0100 |
---|---|---|
committer | Thierry Crozat | 2017-10-06 01:01:16 +0100 |
commit | 9b374acb2b1aad5fd38fb99fdf48cc081e291b9a (patch) | |
tree | 80ea849d4ac12e23dc55888095b66757f1c50f9a /engines/tony/mpal | |
parent | a6caf3a951b695c6f42683598043531f82a54b20 (diff) | |
download | scummvm-rg350-9b374acb2b1aad5fd38fb99fdf48cc081e291b9a.tar.gz scummvm-rg350-9b374acb2b1aad5fd38fb99fdf48cc081e291b9a.tar.bz2 scummvm-rg350-9b374acb2b1aad5fd38fb99fdf48cc081e291b9a.zip |
TONY: 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/tony/mpal')
-rw-r--r-- | engines/tony/mpal/mpal.cpp | 4 | ||||
-rw-r--r-- | engines/tony/mpal/mpal.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 9172843781..7319509624 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1548,7 +1548,7 @@ void mpalFree() { * @remarks This is the specialized version of the original single mpalQuery * method that returns numeric results. */ -uint32 mpalQueryDWORD(uint16 wQueryType, ...) { +uint32 mpalQueryDWORD(uint wQueryType, ...) { Common::String buf; uint32 dwRet = 0; @@ -1744,7 +1744,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { * @remarks This is the specialized version of the original single mpalQuery * method that returns a pointer or handle. */ -MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { +MpalHandle mpalQueryHANDLE(uint wQueryType, ...) { Common::String buf; va_list v; va_start(v, wQueryType); diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h index af24c46697..56448a554d 100644 --- a/engines/tony/mpal/mpal.h +++ b/engines/tony/mpal/mpal.h @@ -394,7 +394,7 @@ void mpalFree(); * @remarks This is the specialized version of the original single mpalQuery * method that returns numeric results. */ -uint32 mpalQueryDWORD(uint16 wQueryType, ...); +uint32 mpalQueryDWORD(uint wQueryType, ...); /** * This is a general function to communicate with the library, to request information @@ -405,7 +405,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...); * @remarks This is the specialized version of the original single mpalQuery * method that returns a pointer or handle. */ -MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...); +MpalHandle mpalQueryHANDLE(uint wQueryType, ...); /** * This is a general function to communicate with the library, to request information |