Explorar o código

Bug fix in Win32 mg_mkdir

Sergey Lyubka %!s(int64=12) %!d(string=hai) anos
pai
achega
d3005df019
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 }