Browse Source

Bug fix in Win32 mg_mkdir

Sergey Lyubka 12 years ago
parent
commit
d3005df019
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mongoose.c

+ 1 - 1
mongoose.c

@@ -1169,7 +1169,7 @@ static int mg_mkdir(const char *path, int mode) {
   mg_strlcpy(buf, path, sizeof(buf));
   change_slashes_to_backslashes(buf);
 
-  (void) MultiByteToWideChar(CP_UTF8, 0, buf, -1, wbuf, sizeof(wbuf));
+  (void) MultiByteToWideChar(CP_UTF8, 0, buf, -1, wbuf, ARRAY_SIZE(wbuf));
 
   return CreateDirectoryW(wbuf, NULL) ? 0 : -1;
 }