X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1af48460acd568e36f3d11ef2c9fc91328339b62..b2ddee86fe73c5ae8edc59871fea9f40e84cbc2d:/src/common/wxchar.cpp?ds=sidebyside diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 2d2668191a..63ae0e26e7 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -280,7 +280,9 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax, ::sprintf(szScratch, s_szFlags, val); } else if (ilen == -1) { - short int val = va_arg(argptr, short int); + // NB: 'short int' value passed through '...' + // is promoted to 'int' + short int val = (short int) va_arg(argptr, int); ::sprintf(szScratch, s_szFlags, val); } else if (ilen == 1) {