mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Replace snprintf by UTIL_Format.
This commit is contained in:
parent
8d2770f2f2
commit
6da2078067
@ -137,7 +137,7 @@ SMCError TextParsers::ParseSMCFile(const char *file,
|
|||||||
states->col = 0;
|
states->col = 0;
|
||||||
}
|
}
|
||||||
/*libsys->GetPlatformError(error, sizeof(error));*/
|
/*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;
|
return SMCError_StreamOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ SMCError TextParsers::ParseSMCFile(const char *file,
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
errstr = GetSMCErrorString(result);
|
errstr = GetSMCErrorString(result);
|
||||||
snprintf(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error");
|
UTIL_Format(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ SMCError TextParsers::ParseSMCStream(const char *stream,
|
|||||||
result = ParseStream_SMC(&rs, RawStreamReader, smc_listener, states);
|
result = ParseStream_SMC(&rs, RawStreamReader, smc_listener, states);
|
||||||
|
|
||||||
const char *errstr = GetSMCErrorString(result);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user