diff --git a/amxmodx/CTextParsers.cpp b/amxmodx/CTextParsers.cpp index 5b2d0599..3d508899 100644 --- a/amxmodx/CTextParsers.cpp +++ b/amxmodx/CTextParsers.cpp @@ -137,7 +137,7 @@ SMCError TextParsers::ParseSMCFile(const char *file, states->col = 0; } /*libsys->GetPlatformError(error, sizeof(error));*/ - snprintf(buffer, maxsize, "File could not be opened: %s", error); + UTIL_Format(buffer, maxsize, "File could not be opened: %s", error); return SMCError_StreamOpen; } @@ -146,7 +146,7 @@ SMCError TextParsers::ParseSMCFile(const char *file, fclose(fp); errstr = GetSMCErrorString(result); - snprintf(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); + UTIL_Format(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); return result; } @@ -197,7 +197,7 @@ SMCError TextParsers::ParseSMCStream(const char *stream, result = ParseStream_SMC(&rs, RawStreamReader, smc_listener, states); const char *errstr = GetSMCErrorString(result); - snprintf(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); + UTIL_Format(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); return result; }