[PATCH] test -1 length for NULL ptr too.
Marcus Meissner
marcus at jet.franken.de
Thu Nov 23 14:24:33 CST 2006
Hi,
Perhaps someone could test this on Windows too,
but I think it will work same way.
Ciao, Marcus
---
dlls/kernel32/tests/codepage.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
342bbc808ca189f682d74c0489f8f2802181f45c
diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c
index d65aa59..de15067 100644
--- a/dlls/kernel32/tests/codepage.c
+++ b/dlls/kernel32/tests/codepage.c
@@ -101,6 +101,13 @@ static void test_null_source(void)
ok(!len && GLE == ERROR_INVALID_PARAMETER,
"WideCharToMultiByte returned %d with GLE=%d (expected 0 with ERROR_INVALID_PARAMETER)\n",
len, GLE);
+
+ SetLastError(0);
+ len = WideCharToMultiByte(CP_ACP, 0, NULL, -1, NULL, 0, NULL, NULL);
+ GLE = GetLastError();
+ ok(!len && GLE == ERROR_INVALID_PARAMETER,
+ "WideCharToMultiByte returned %d with GLE=%d (expected 0 with ERROR_INVALID_PARAMETER)\n",
+ len, GLE);
}
/* lstrcmpW is not supported on Win9x! */
--
1.2.4
More information about the wine-patches
mailing list