Port windows unicode fix from @da2ce7 to 4.x branch

This commit is contained in:
Jason Turner 2014-01-23 12:28:33 -07:00
parent 8724e0cb80
commit eb1a1c0275

View File

@ -46,9 +46,9 @@ void *cast_module_symbol(std::string (*t_path)())
std::string default_search_path()
{
#ifdef CHAISCRIPT_WINDOWS
TCHAR path[2048];
int size = GetModuleFileName(0, path, sizeof(path)-1);
#ifdef CHAISCRIPT_WINDOWS // force no unicode
CHAR path[4096];
int size = GetModuleFileNameA(0, path, sizeof(path)-1);
std::string exepath(path, size);