winspool: Test for failure using correct size.

This commit is contained in:
Jeremy White 2009-12-23 11:21:17 -06:00 committed by Alexandre Julliard
parent 7251e91d4d
commit 09401dd4b1
1 changed files with 1 additions and 1 deletions

View File

@ -4447,7 +4447,7 @@ BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
if(pcbNeeded) *pcbNeeded = size + needed; if(pcbNeeded) *pcbNeeded = size + needed;
TRACE("buffer space %d required %d\n", cbBuf, size + needed); TRACE("buffer space %d required %d\n", cbBuf, size + needed);
if(cbBuf >= needed) return TRUE; if(cbBuf >= size + needed) return TRUE;
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE; return FALSE;
} }