1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-19 08:52:34 +01:00

fixed SourceMM crashing on long paths (steam srcds)

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40327
This commit is contained in:
David Anderson 2007-01-27 09:18:17 +00:00
parent ead1b254c7
commit 59ec4c31ee
3 changed files with 6 additions and 2 deletions

View File

@ -414,6 +414,11 @@ void CSmmAPI::PathFormat(char *buffer, size_t len, const char *fmt, ...)
size_t mylen = vsnprintf(buffer, len, fmt, ap);
va_end(ap);
if (mylen == 0xFFFFFFFF || mylen >= len)
{
mylen = len - 1;
}
for (size_t i=0; i<mylen; i++)
{
if (buffer[i] == ALT_SEP_CHAR)

View File

@ -511,7 +511,7 @@ int LoadPluginsFromFile(const char *_file)
return -1;
}
char buffer[255], error[255], full_path[128];
char buffer[255], error[255], full_path[255];
const char *ptr, *ext, *file;
size_t length;
while (!feof(fp))

View File

@ -1,6 +1,5 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////