winspool/tests: A truncated dmDeviceName is 0-terminated.
This commit is contained in:
parent
c65a86828c
commit
78a6d53b6e
|
@ -1100,8 +1100,8 @@ static void test_DEVMODE(const DEVMODE *dm, LONG dmSize, LPCSTR exp_prn_name)
|
||||||
(dmDeviceName, dmSpecVersion, dmDriverVersion and dmDriverExtra)
|
(dmDeviceName, dmSpecVersion, dmDriverVersion and dmDriverExtra)
|
||||||
We skip the Tests on this Platform */
|
We skip the Tests on this Platform */
|
||||||
if (dm->dmSpecVersion || dm->dmDriverVersion || dm->dmDriverExtra) {
|
if (dm->dmSpecVersion || dm->dmDriverVersion || dm->dmDriverExtra) {
|
||||||
/* The Printername can be larger (MAX_PATH) than CCHDEVICENAME */
|
/* The 0-terminated Printername can be larger (MAX_PATH) than CCHDEVICENAME */
|
||||||
ok(!strncmp(exp_prn_name, (LPCSTR)dm->dmDeviceName, CCHDEVICENAME),
|
ok(!strncmp(exp_prn_name, (LPCSTR)dm->dmDeviceName, CCHDEVICENAME -1),
|
||||||
"expected '%s', got '%s'\n", exp_prn_name, dm->dmDeviceName);
|
"expected '%s', got '%s'\n", exp_prn_name, dm->dmDeviceName);
|
||||||
ok(dm->dmSize + dm->dmDriverExtra == dmSize,
|
ok(dm->dmSize + dm->dmDriverExtra == dmSize,
|
||||||
"%u != %ld\n", dm->dmSize + dm->dmDriverExtra, dmSize);
|
"%u != %ld\n", dm->dmSize + dm->dmDriverExtra, dmSize);
|
||||||
|
|
Loading…
Reference in New Issue