diff options
-rw-r--r-- | util/chesscountry.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/chesscountry.c b/util/chesscountry.c index 95965c2c..b85fe86e 100644 --- a/util/chesscountry.c +++ b/util/chesscountry.c @@ -151,7 +151,10 @@ main(void) if (get_record(buf, &item, sizeof item, i) != -1) { FILE *fp1; - if (!strncmp(item.title + 3, name, namelen)) + if (!strncmp(item.title + 3, name, namelen) && + (item.title[namelen + 3] == '\0' || + item.title[namelen + 3] == ' ') + ) { sethomefile(buf, userid, photo_fname); if ((fp1 = fopen(buf, "w"))) |