fix va_arg(.,short int) problem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-09-05 23:02:56 +00:00
parent 248bcf0aa5
commit 40dd6c07aa

View File

@ -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) {