Fix problematic assert
*/
#include "premake.h"
-#include "assert.h"
int os_getcwd(lua_State* L)
{
@@ -25,10 +24,9 @@ int do_getcwd(char* buffer, size_t size)
int result;
#if PLATFORM_WINDOWS
- assert(size == 0x4000);
- wchar_t wbuffer[0x4000];
+ wchar_t wbuffer[MAX_PATH];
- result = (GetCurrentDirectoryW((DWORD)size, wbuffer) != 0);
+ result = (GetCurrentDirectoryW(MAX_PATH, wbuffer) != 0);
if (result) {
WideCharToMultiByte(CP_UTF8, 0, wbuffer, -1, buffer, size, NULL, NULL);
