summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-08 10:06:43 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-08 10:06:43 +0800
commit3345b9246e647a9080038ad91c2440de864147f3 (patch)
treeca6a40c86764336a7568ca3b46d4e85053304ea5 /util
parentf96325e164ca940616f74b6cf5f9e50fc310d244 (diff)
downloadpttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar.gz
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar.bz2
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar.lz
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar.xz
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.tar.zst
pttbbs-3345b9246e647a9080038ad91c2440de864147f3.zip
Make matching of chess country picture more currectly.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2579 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/chesscountry.c5
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")))