aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/makerank.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c
index d590818..ca3b65a 100644
--- a/FICS/makerank.c
+++ b/FICS/makerank.c
@@ -38,18 +38,18 @@ GetPlayerInfo(char *fileName, ENTRY *e)
}
if ((fp = fopen(fileName, "r")) == NULL ||
- fgets(line, sizeof line - 1, fp) == NULL ||
+ fgets(line, sizeof line, fp) == NULL ||
feof(fp))
return 0;
if (!strcmp(line, "v 1\n")) {
- fgets(line, 99, fp);
+ fgets(line, sizeof line, fp);
sscanf(line, "%s", e->name);
- fgets(line, 99, fp);
- fgets(line, 99, fp);
- fgets(line, 99, fp);
+ fgets(line, sizeof line, fp);
+ fgets(line, sizeof line, fp);
+ fgets(line, sizeof line, fp);
if (fscanf(fp, "%d %*u %*u %*u %d %*u %*u %*u %*u %d %*u %*u "
"%*u %d %*u %*u %*u %*u %d %*u %*u %*u %d %*u %*u %*u %*u "
@@ -101,7 +101,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
done = 1;
}
- fgets(line, 99, fp);
+ fgets(line, sizeof line, fp);
} while (!done && !feof(fp));
}
@@ -137,7 +137,7 @@ LoadEntries(void)
continue;
while (1) {
- fgets(e.name, MAX_LOGIN_NAME, fpPlayerList);
+ fgets(e.name, sizeof(e.name), fpPlayerList);
if (feof(fpPlayerList))
break;
@@ -194,7 +194,7 @@ SetComputers(int n)
return 0;
while (i < n) {
- fgets(comp, 29, fpComp);
+ fgets(comp, sizeof comp, fpComp);
if (feof(fpComp))
break;