summaryrefslogtreecommitdiff
path: root/redo/comctl32_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-12 15:58:17 -0400
committerPietro Gagliardi <[email protected]>2014-08-12 15:58:17 -0400
commitd060977cc7644be37774192f0015ce1e6a91b2aa (patch)
tree965af16a36241357e0bc3f6749fc4fc766c38bf2 /redo/comctl32_windows.c
parentf27aa8df46e00e7358ead993c7b38e58ad372a78 (diff)
Got rid of the strlen() call in comctl32_windows.c. Thanks to joeshow on the Gopher Academy Slack.
Diffstat (limited to 'redo/comctl32_windows.c')
-rw-r--r--redo/comctl32_windows.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/redo/comctl32_windows.c b/redo/comctl32_windows.c
index df1bdcd..244573d 100644
--- a/redo/comctl32_windows.c
+++ b/redo/comctl32_windows.c
@@ -56,7 +56,7 @@ DWORD initCommonControls(char **errmsg)
*errmsg = "error creating manifest file";
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 */
if (WriteFile(file, manifest, nExpected, &nGot, NULL) == 0) {
*errmsg = "error writing manifest file";