Replace various sprintf calls with snprintf calls
This commit is contained in:
1 parent
ab18167a09
commit
aea99aa3a3
4 files changed
+9
-9
No files matched your search
@@ -546,7 +546,7 @@ static void DefineSymbol( char *sym, int value ) {
|
||||
|
||||
// add the file prefix to local symbols to guarantee unique
|
||||
if ( sym[0] == '$' ) {
|
||||
sprintf( expanded, "%s_%i", sym, currentFileIndex );
|
||||
snprintf( expanded, sizeof(expanded), "%s_%i", sym, currentFileIndex );
|
||||
sym = expanded;
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ static int LookupSymbol( char *sym ) {
|
||||
|
||||
// add the file prefix to local symbols to guarantee unique
|
||||
if ( sym[0] == '$' ) {
|
||||
sprintf( expanded, "%s_%i", sym, currentFileIndex );
|
||||
snprintf( expanded, sizeof(expanded), "%s_%i", sym, currentFileIndex );
|
||||
sym = expanded;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user