summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)) {