Fixed some sprintf calls

This commit is contained in:
Michiel Broek
2006-02-23 21:37:04 +00:00
parent 0651057b66
commit edc2dca188
3 changed files with 6 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ int main(int argc, char **argv)
bwname = xstrcpy(argv[1]);
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s.INF", bwname);
snprintf(temp, PATH_MAX, "%s.INF", bwname);
if ((fp = fopen(temp, "r"))) {
printf("---- %s.INF -------------------------------------------------------\n", bwname);
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
fclose(fp);
}
sprintf(temp, "%s.MIX", bwname);
snprintf(temp, PATH_MAX, "%s.MIX", bwname);
if ((fp = fopen(temp, "r"))) {
printf("---- %s.MIX -------------------------------------------------------\n\n", bwname);
printf(" Area Total Pers. FTI ptr\n");
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
fclose(fp);
}
sprintf(temp, "%s.FTI", bwname);
snprintf(temp, PATH_MAX, "%s.FTI", bwname);
pos = 0;
if ((fp = fopen(temp, "r"))) {
printf("---- %s.FTI -------------------------------------------------------\n\n", bwname);