summaryrefslogtreecommitdiffstats
path: root/mbbsd/friend.c
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 /mbbsd/friend.c
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 'mbbsd/friend.c')
-rw-r--r--mbbsd/friend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 2d210369..abb736c7 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -493,7 +493,7 @@ friend_edit(int type)
if (uident[0] == 'a') {
move(1, 0);
usercomplete(msg_uid, uident);
- if (uident[0] && searchuser(uident, uident) && !Vector_search(&namelist, uident)) {
+ if (uident[0] && searchuser(uident, uident) && Vector_search(&namelist, uident) < 0) {
friend_add(uident, type, NULL);
dirty = 1;
}
@@ -510,13 +510,13 @@ friend_edit(int type)
} else if (uident[0] == 'e' && count) {
move(1, 0);
namecomplete2(&namelist, msg_uid, uident);
- if (uident[0] && Vector_search(&namelist, uident)) {
+ if (uident[0] && Vector_search(&namelist, uident) >= 0) {
friend_editdesc(uident, type);
}
} else if (uident[0] == 'd' && count) {
move(1, 0);
namecomplete2(&namelist, msg_uid, uident);
- if (uident[0] && Vector_search(&namelist, uident)) {
+ if (uident[0] && Vector_search(&namelist, uident) >= 0) {
friend_delete(uident, type);
dirty = 1;
}