summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-07-31 19:04:51 +0800
committerrobertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-07-31 19:04:51 +0800
commitccf7eb12dd1b44b93d7764e3cb799368a2ffe22e (patch)
tree216b0780bddd007b0e90fd69ea9e0d319e2bcdbf
parent8acd0cf8ce1a4d95e482e0a6351b6da2d7baf6e8 (diff)
downloadpttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar.gz
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar.bz2
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar.lz
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar.xz
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.tar.zst
pttbbs-ccf7eb12dd1b44b93d7764e3cb799368a2ffe22e.zip
Fix bug: not updating myangel if set to "", "-".
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5693 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/user.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c
index 9e5372f4..30e5343c 100644
--- a/pttbbs/mbbsd/user.c
+++ b/pttbbs/mbbsd/user.c
@@ -777,8 +777,12 @@ uinfo_query(const char *orig_uid, int adminmode, int unum)
getdata_str(y, 0, prompt, buf, IDLEN + 1, DOECHO,
x.myangel);
- if(buf[0] == 0 || strcmp(buf, "-") == 0 ||
- strcmp(x.myangel, buf) == 0)
+ if (buf[0] == 0 || strcmp(buf, "-") == 0) {
+ strlcpy(x.myangel, buf, IDLEN + 1);
+ break;
+ }
+
+ if (strcmp(x.myangel, buf) == 0)
break;
if (getuser(buf, &xuser) && (xuser.userlevel & PERM_ANGEL)) {