Got rid of the strlen() call in comctl32_windows.c. Thanks to joeshow on the Gopher Academy Slack.
This commit is contained in:
parent
f27aa8df46
commit
d060977cc7
|
@ -56,7 +56,7 @@ DWORD initCommonControls(char **errmsg)
|
||||||
*errmsg = "error creating manifest file";
|
*errmsg = "error creating manifest file";
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
}
|
}
|
||||||
nExpected = strlen(manifest); /* TODO make static */
|
nExpected = (sizeof manifest / sizeof manifest[0]) - 1; /* - 1 to omit the terminating null character)
|
||||||
SetLastError(0); /* catch errorless short writes */
|
SetLastError(0); /* catch errorless short writes */
|
||||||
if (WriteFile(file, manifest, nExpected, &nGot, NULL) == 0) {
|
if (WriteFile(file, manifest, nExpected, &nGot, NULL) == 0) {
|
||||||
*errmsg = "error writing manifest file";
|
*errmsg = "error writing manifest file";
|
||||||
|
|
Loading…
Reference in New Issue