Fixes "warning: Size argument is greater than the free space in the destination buffer" with XSTRNCAT().

This commit is contained in:
David Garske 2015-11-23 14:41:24 -08:00
parent 6d67ee11b6
commit c3b3ba4a2a

View File

@ -1185,10 +1185,10 @@ static INLINE int OpenNitroxDevice(int dma_mode,int dev_id)
return depth;
}
#ifdef USE_WINDOWS_API
XSTRNCAT(path, "..\\", MAX_PATH);
XSTRNCAT(path, "..\\", MAX_PATH - XSTRLEN(path));
SetCurrentDirectoryA(path);
#else
XSTRNCAT(path, "../", MAX_PATH);
XSTRNCAT(path, "../", MAX_PATH - XSTRLEN(path));
if (chdir(path) < 0) {
printf("chdir to %s failed\n", path);
break;