aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/makerank.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/makerank.c')
-rw-r--r--FICS/makerank.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c
index d851c53..05671ad 100644
--- a/FICS/makerank.c
+++ b/FICS/makerank.c
@@ -171,7 +171,7 @@ LoadEntries(void)
break;
len = strlen(e.name);
- e.name[len - 1] = '\0';
+ e.name[strcspn(e.name, "\n")] = '\0';
if (e.name[0] != letter1) {
printf("File %c/%s: wrong directory.\n",
@@ -226,7 +226,7 @@ SetComputers(int n)
feof(fpComp))
break;
- comp[strlen(comp) - 1] = '\0';
+ comp[strcspn(comp, "\n")] = '\0';
while (i < n && strcasecmp(list[i]->name, comp) < 0)
i++;