mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Use str_copy
instead of snprintf
to copy strings
This commit is contained in:
parent
c4cf26ea81
commit
73fe4e6ed4
|
@ -46,9 +46,9 @@ int main(int argc, const char **argv)
|
|||
}
|
||||
|
||||
char aFilenames[3][64];
|
||||
snprintf(aFilenames[0], 64, "%s", argv[3]); //input_map
|
||||
snprintf(aFilenames[1], 64, "%s", argv[9]); //output_map
|
||||
snprintf(aFilenames[2], 64, "%s", argv[1]); //image_file
|
||||
str_copy(aFilenames[0], argv[3]); //input_map
|
||||
str_copy(aFilenames[1], argv[9]); //output_map
|
||||
str_copy(aFilenames[2], argv[1]); //image_file
|
||||
|
||||
int aLayerID[2] = {str_toint(argv[4]), str_toint(argv[5])}; //layergroup_id, layer_id
|
||||
int aStartingPos[2] = {str_toint(argv[6]) * 32, str_toint(argv[7]) * 32}; //pos_x, pos_y
|
||||
|
|
|
@ -130,7 +130,7 @@ int main(int argc, const char **argv)
|
|||
}
|
||||
|
||||
char aFilename[64];
|
||||
snprintf(aFilename, 64, "%s", argv[1]);
|
||||
str_copy(aFilename, argv[1]);
|
||||
int EnvID = str_toint(argv[2]) - 1;
|
||||
dbg_msg("map_find_env", "input_map='%s'; env_number='#%d';", aFilename, EnvID + 1);
|
||||
|
||||
|
|
|
@ -72,9 +72,9 @@ int main(int argc, const char *argv[])
|
|||
}
|
||||
|
||||
char aaMapNames[3][64];
|
||||
snprintf(aaMapNames[0], 64, "%s", argv[1]); //from_map
|
||||
snprintf(aaMapNames[1], 64, "%s", argv[4]); //to_map
|
||||
snprintf(aaMapNames[2], 64, "%s", argv[9]); //output_map
|
||||
str_copy(aaMapNames[0], argv[1]); //from_map
|
||||
str_copy(aaMapNames[1], argv[4]); //to_map
|
||||
str_copy(aaMapNames[2], argv[9]); //output_map
|
||||
|
||||
float aaaGameAreas[2][2][2];
|
||||
|
||||
|
|
Loading…
Reference in a new issue