diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-29 03:35:29 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-29 03:35:29 +0800 |
commit | 747db9b7bed623d2d957aa14dbc6a505cf763be8 (patch) | |
tree | 479cf6940e240c6e6e2f8435e13d97f9269788c5 /mbbsd/friend.c | |
parent | 980b8d2d2504b7299ceee845aff46c1f593e498f (diff) | |
download | pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.gz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.bz2 pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.lz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.xz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.zst pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.zip |
change getdata() constant to sizeof()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@131 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/friend.c')
-rw-r--r-- | mbbsd/friend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c index fef3fabc..bac0674e 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -1,4 +1,4 @@ -/* $Id: friend.c,v 1.4 2002/04/09 20:31:50 in2 Exp $ */ +/* $Id: friend.c,v 1.5 2002/04/28 19:35:29 in2 Exp $ */ #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -124,7 +124,7 @@ void friend_add(char *uident, int type) { strcpy(t_uident, uident); if (type != FRIEND_ALOHA && type != FRIEND_POST) - getdata(2, 0, friend_desc[type], buf, 40, DOECHO); + getdata(2, 0, friend_desc[type], buf, sizeof(buf), DOECHO); if ((fp = fopen(fpath, "a"))) { @@ -445,12 +445,13 @@ void friend_edit(int type) { } else if (*uident == 'w' && count) { - if (!getdata(0, 0, "群體水球:", uident, 60, DOECHO)) + char wall[60]; + if (!getdata(0, 0, "群體水球:", uident, sizeof(wall), DOECHO)) continue; if (getdata(0, 0, "確定丟出群體水球? [Y]", line, 4, LCECHO) && *line == 'n') continue; - friend_water(uident, type); + friend_water(wall, type); } else break; |