mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Fix an off-by-one in windows_crashcatcher.cpp
This commit is contained in:
parent
f0cef87cd8
commit
813969a46e
@ -136,7 +136,7 @@ namespace Crash
|
||||
|
||||
memset(mShm->mStartup.mLogFilePath, 0, sizeof(mShm->mStartup.mLogFilePath));
|
||||
int length = crashLogPath.length();
|
||||
if (length > MAX_LONG_PATH) length = MAX_LONG_PATH;
|
||||
if (length >= MAX_LONG_PATH) length = MAX_LONG_PATH - 1;
|
||||
strncpy(mShm->mStartup.mLogFilePath, crashLogPath.c_str(), length);
|
||||
mShm->mStartup.mLogFilePath[length] = '\0';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user