diff --git a/engine/shared/library/sharedFile/src/shared/TreeFile.cpp b/engine/shared/library/sharedFile/src/shared/TreeFile.cpp index 0c46332c..09acf384 100644 --- a/engine/shared/library/sharedFile/src/shared/TreeFile.cpp +++ b/engine/shared/library/sharedFile/src/shared/TreeFile.cpp @@ -875,6 +875,7 @@ bool TreeFile::stripTreeFileSearchPathFromFile(const char *inputPath, char *outp { // make sure the output buffer has enough room int const pathLength = static_cast(strlen(path)); + int const outputLength = static_cast(strlen(buffer)) - pathLength; if (outputLength > outputPathBufferSize) return false;