Customized fork of github.com/rxi/lite

Fixed string quoting on windows in `system.exec()`

rxi 35ce3d32 6b39fb6d

Changed files
+2 -2
src
api
+2 -2
src/api/system.c
··· 335 335 static int f_exec(lua_State *L) { 336 336 size_t len; 337 337 const char *cmd = luaL_checklstring(L, 1, &len); 338 - char *buf = malloc(len + 16); 338 + char *buf = malloc(len + 32); 339 339 if (!buf) { luaL_error(L, "buffer allocation failed"); } 340 340 #if _WIN32 341 - sprintf(buf, "cmd /c %s", cmd); 341 + sprintf(buf, "cmd /c \"%s\"", cmd); 342 342 WinExec(buf, SW_HIDE); 343 343 #else 344 344 sprintf(buf, "%s &", cmd);