}
match = 0;
while (!feof(fp) && !match) {
- if (fgets(host, sizeof(host) - 1, fp) == NULL)
+ if (fgets(host, sizeof(host), fp) == NULL)
break;
if (host[0] == '#')
continue;
- if (fgets(user, sizeof(user) - 1, fp) == NULL)
+ if (fgets(user, sizeof(user), fp) == NULL)
break;
host[strlen(host) - 1] = '\0';
user[strlen(user) - 1] = '\0';
printf("WARNING: this blasts the existing game in %s (if any)\n",
datadir);
printf("continue? ");
- fgets(buf, sizeof(buf) - 1, stdin);
+ fgets(buf, sizeof(buf), stdin);
if (*buf != 'y' && *buf != 'Y')
exit(1);
}