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;
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user