Bugfix: Do *not* zero out output buffer in GetNumberFormat32[AW].
This commit is contained in:
parent
e520e212ae
commit
f76dac45b3
@ -2981,19 +2981,10 @@ INT32 WINAPI GetNumberFormat32A(LCID locale, DWORD dwflags,
|
|||||||
LPCSTR lpvalue, const NUMBERFMT32A * lpFormat,
|
LPCSTR lpvalue, const NUMBERFMT32A * lpFormat,
|
||||||
LPSTR lpNumberStr, int cchNumber)
|
LPSTR lpNumberStr, int cchNumber)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
|
|
||||||
FIXME(file,"%s: stub, no reformating done\n",lpvalue);
|
FIXME(file,"%s: stub, no reformating done\n",lpvalue);
|
||||||
|
|
||||||
n = strlen(lpvalue);
|
lstrcpyn32A( lpNumberStr, lpvalue, cchNumber );
|
||||||
if (cchNumber) {
|
return cchNumber? lstrlen32A( lpNumberStr ) : 0;
|
||||||
strncpy(lpNumberStr,lpvalue,cchNumber);
|
|
||||||
if (cchNumber <= n) {
|
|
||||||
lpNumberStr[cchNumber-1] = 0;
|
|
||||||
n = cchNumber-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* GetNumberFormat32W (KERNEL32.xxx)
|
* GetNumberFormat32W (KERNEL32.xxx)
|
||||||
@ -3002,19 +2993,10 @@ INT32 WINAPI GetNumberFormat32W(LCID locale, DWORD dwflags,
|
|||||||
LPCWSTR lpvalue, const NUMBERFMT32W * lpFormat,
|
LPCWSTR lpvalue, const NUMBERFMT32W * lpFormat,
|
||||||
LPWSTR lpNumberStr, int cchNumber)
|
LPWSTR lpNumberStr, int cchNumber)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
|
|
||||||
FIXME(file,"%s: stub, no reformating done\n",debugstr_w(lpvalue));
|
FIXME(file,"%s: stub, no reformating done\n",debugstr_w(lpvalue));
|
||||||
|
|
||||||
n = lstrlen32W(lpvalue);
|
lstrcpyn32W( lpNumberStr, lpvalue, cchNumber );
|
||||||
if (cchNumber) {
|
return cchNumber? lstrlen32W( lpNumberStr ) : 0;
|
||||||
lstrcpyn32W(lpNumberStr,lpvalue,cchNumber);
|
|
||||||
if (cchNumber <= n) {
|
|
||||||
lpNumberStr[cchNumber-1] = 0;
|
|
||||||
n = cchNumber-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* OLE2NLS_CheckLocale [intern]
|
* OLE2NLS_CheckLocale [intern]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user