From 3345b9246e647a9080038ad91c2440de864147f3 Mon Sep 17 00:00:00 2001 From: scw Date: Tue, 8 Mar 2005 02:06:43 +0000 Subject: Make matching of chess country picture more currectly. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2579 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/chesscountry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"))) -- cgit v1.2.3