Bug fix for stack overrun in lua-engine on mac OSX.

This commit is contained in:
mjbudd77 2021-07-10 14:17:42 -04:00
parent 5c992a8610
commit 21291430b4
1 changed files with 2 additions and 2 deletions

View File

@ -559,7 +559,7 @@ static int emu_getdir(lua_State *L) {
return 1;
#elif __linux__
char exePath[ 2048 ];
ssize_t count = ::readlink( "/proc/self/exe", exePath, sizeof(exePath)-1 );
ssize_t count = ::readlink( "/proc/self/exe", exePath, sizeof(exePath)-1 );
if ( count > 0 )
{
@ -584,7 +584,7 @@ static int emu_getdir(lua_State *L) {
if ( result == 0 )
{
char *dir;
exePath[ bufSize ] = 0;
exePath[ sizeof(exePath)-1 ] = 0;
//printf("EXE Path: '%s' \n", exePath );
dir = ::dirname( exePath );