diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-10 08:49:47 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-10 08:49:47 +0800 |
commit | 540cfa70e8e8b4db3cc2addccfcbeeb69fffa033 (patch) | |
tree | 6a4dec7d69249e48a6f79c4436eb634cb28744b2 /mbbsd/user.c | |
parent | a8a0ef3c4d10bf576054dc26348d9b4e6efeecc2 (diff) | |
download | pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.gz pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.bz2 pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.lz pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.xz pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.zst pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.zip |
merge back from branch victor.solaris
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2189 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r-- | mbbsd/user.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c index 5ce60d71..eb93217e 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -911,7 +911,7 @@ ispersonalid(char *inid) strlcpy(id, inid, sizeof(id)); i = cksum = 0; - if (!isalpha(id[0]) && (strlen(id) != 10)) + if (!isalpha((int)id[0]) && (strlen(id) != 10)) return 0; if (!(id[1] == '1' || id[1] == '2')) return 0; @@ -927,12 +927,12 @@ ispersonalid(char *inid) i++; i += 10; id[0] = i % 10 + '0'; - if (!isdigit(id[9])) + if (!isdigit((int)id[9])) return 0; cksum += (id[9] - '0') + (i / 10); for (j = 0; j < 9; ++j) { - if (!isdigit(id[j])) + if (!isdigit((int)id[j])) return 0; cksum += (id[j] - '0') * (9 - j); } @@ -1196,7 +1196,7 @@ static char *isvalidphone(char *phone) { int i; for( i = 0 ; phone[i] != 0 ; ++i ) - if( !isdigit(phone[i]) ) + if( !isdigit((int)phone[i]) ) return "請不要加分隔符號"; if (!removespace(phone) || strlen(phone) < 9 || |