mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-30 19:52:17 +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:
parent
ead1b254c7
commit
59ec4c31ee
@ -414,6 +414,11 @@ void CSmmAPI::PathFormat(char *buffer, size_t len, const char *fmt, ...)
|
|||||||
size_t mylen = vsnprintf(buffer, len, fmt, ap);
|
size_t mylen = vsnprintf(buffer, len, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
if (mylen == 0xFFFFFFFF || mylen >= len)
|
||||||
|
{
|
||||||
|
mylen = len - 1;
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i=0; i<mylen; i++)
|
for (size_t i=0; i<mylen; i++)
|
||||||
{
|
{
|
||||||
if (buffer[i] == ALT_SEP_CHAR)
|
if (buffer[i] == ALT_SEP_CHAR)
|
||||||
|
@ -511,7 +511,7 @@ int LoadPluginsFromFile(const char *_file)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char buffer[255], error[255], full_path[128];
|
char buffer[255], error[255], full_path[255];
|
||||||
const char *ptr, *ext, *file;
|
const char *ptr, *ext, *file;
|
||||||
size_t length;
|
size_t length;
|
||||||
while (!feof(fp))
|
while (!feof(fp))
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user