Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed win32print.DeviceCapabilities() returning strings with junk in …
…them. Previously this code would ZeroMemory() the output buffer before passing it to DeviceCapabilities(), and then assume that only characters in each string would be changed, i.e. the characters following the null-terminator would remain null. So it would only check if the last character in each string was null, to check if the string was null-terminated. This assumption is wrong - sometimes DeviceCapabilities() sets the characters after null to junk. Now every character in the returned buffer is checked for being null before falling back to the case where the string takes up all available space. #1654
- Loading branch information
1 parent
f3f55ab
commit e858c8a
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters