- May
- 13,193
- 180
I have a plugin that begins like this.
If I call that plugin with no arguments, Sscanf returns 1. I imagine the value of c is whatever garbage was there in the first place. But should Sscanf() return 1?
Code:
INT WINAPI TEST ( LPWSTR psz )
{
WCHAR c;
INT n = Sscanf(psz, L" %c", &c);
Printf(L"n = %d ... **%c** ... %d\r\n", n, c, c);
If I call that plugin with no arguments, Sscanf returns 1. I imagine the value of c is whatever garbage was there in the first place. But should Sscanf() return 1?
Code:
v:\> test
n = 1 ... **䝨** ... 18280
v:\> test
n = 1 ... **睸** ... 30584
v:\> test
n = 1 ... **枈** ... 26504