mirror of
https://github.com/reactos/reactos.git
synced 2024-11-06 14:44:19 +00:00
msvc6 compilation fixes
fix buffer over(under?)flow in calc_sep() svn path=/trunk/; revision=18549
This commit is contained in:
parent
a658088fed
commit
67d9667289
1 changed files with 5 additions and 5 deletions
|
@ -470,7 +470,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
int len;
|
int len;
|
||||||
TCHAR *s;
|
TCHAR *s;
|
||||||
HGLOBAL hGlobalMemory;
|
HGLOBAL hGlobalMemory;
|
||||||
PSTR pGlobalMemory;
|
LPTSTR pGlobalMemory;
|
||||||
|
|
||||||
if (!(len = _tcslen(calc.display)))
|
if (!(len = _tcslen(calc.display)))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -506,10 +506,10 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
case TEXT('\x16'): // Ctrl+V Paste
|
case TEXT('\x16'): // Ctrl+V Paste
|
||||||
{
|
{
|
||||||
TCHAR *s;
|
TCHAR *s;
|
||||||
int c;
|
TCHAR c;
|
||||||
int cmd = 0;
|
int cmd = 0;
|
||||||
int size = 0;
|
size_t size = 0;
|
||||||
int i = 0;
|
size_t i = 0;
|
||||||
HGLOBAL hGlobalMemory;
|
HGLOBAL hGlobalMemory;
|
||||||
LPTSTR pGlobalMemory;
|
LPTSTR pGlobalMemory;
|
||||||
|
|
||||||
|
@ -3082,7 +3082,7 @@ TCHAR *calc_sep(TCHAR *s)
|
||||||
r[i++] = c;
|
r[i++] = c;
|
||||||
if (x++ % 3 == 0)
|
if (x++ % 3 == 0)
|
||||||
r[i++] = TEXT(',');
|
r[i++] = TEXT(',');
|
||||||
if (n == -1)
|
if (n == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue