summaryrefslogtreecommitdiffstats
path: root/common/sys
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-07-05 22:52:26 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-07-05 22:52:26 +0800
commit1bbc108350cce991c081015da516ad230aa8fe58 (patch)
treeaed3172e26c0fb127c1ba3a143ecf48d5bc51e45 /common/sys
parent1347f95d83b908cd4e61904154feed6ae9ab7389 (diff)
downloadpttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar.gz
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar.bz2
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar.lz
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar.xz
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.tar.zst
pttbbs-1bbc108350cce991c081015da516ad230aa8fe58.zip
Change Vector_search
fix namecomplete case error git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4385 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'common/sys')
-rw-r--r--common/sys/vector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/sys/vector.c b/common/sys/vector.c
index fc99bdc8..af39b410 100644
--- a/common/sys/vector.c
+++ b/common/sys/vector.c
@@ -173,7 +173,7 @@ Vector_search(const struct Vector *self, const char *name)
int i;
for (i=0; i<self->length; i++)
if (strcasecmp(self->base + self->size * i, name) == 0)
- return 1;
- return 0;
+ return i;
+ return -1;
}