diff --git a/src/dlls/ripent.cpp b/src/dlls/ripent.cpp index f15f9a6..aa42e09 100644 --- a/src/dlls/ripent.cpp +++ b/src/dlls/ripent.cpp @@ -421,7 +421,11 @@ skipspace: if (script->script_p == script->end_p) break; if (token_p == &token[MAXTOKEN]) - LOG_MESSAGE(PLID, "Token too large on line %i", scriptline); + { + // if the server does not crash before this happens, then monstermod will. + // simulate a fatal error and be verbose on why it happens. + ALERT(at_logged, "FATAL ERROR (shutting down): ReadEntsFromBSP: Line %i is too long (length > %i).", scriptline, MAXTOKEN); + } } script->script_p++; } @@ -432,7 +436,10 @@ skipspace: if (script->script_p == script->end_p) break; if (token_p == &token[MAXTOKEN]) - LOG_MESSAGE(PLID, "Token too large on line %i", scriptline); + { + // ditto + ALERT(at_logged, "FATAL ERROR (shutting down): ReadEntsFromBSP: Line %i is too long (length > %i).", scriptline, MAXTOKEN); + } } *token_p = 0; diff --git a/src/dlls/ripent.h b/src/dlls/ripent.h index f3baa75..868abed 100644 --- a/src/dlls/ripent.h +++ b/src/dlls/ripent.h @@ -90,7 +90,7 @@ void SafeRead(FILE *f, void *buffer, int count); char *ExpandPath(char *path); // from scripts // -- scriplib.h -- -#define MAXTOKEN 512 +#define MAXTOKEN 4096 extern char token[MAXTOKEN]; bool GetToken(bool crossline);