From 747db9b7bed623d2d957aa14dbc6a505cf763be8 Mon Sep 17 00:00:00 2001 From: in2 Date: Sun, 28 Apr 2002 19:35:29 +0000 Subject: change getdata() constant to sizeof() git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@131 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/xyz.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mbbsd/xyz.c') diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index 786add30..9ddbbe3e 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -1,4 +1,4 @@ -/* $Id: xyz.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */ +/* $Id: xyz.c,v 1.2 2002/04/28 19:35:29 in2 Exp $ */ #include #include #include @@ -182,8 +182,9 @@ int note() { move(12, 0); clrtobot(); outs("\n投五銀... 嗶... 請留言 (至多三行),按[Enter]結束"); - for(i = 0; (i < 3) && getdata(16 + i, 0, ":", myitem.buf[i], 78, - DOECHO) && *myitem.buf[i]; i++); + for(i = 0; (i < 3) && getdata(16 + i, 0, ":", myitem.buf[i], + sizeof(myitem.buf[i]), DOECHO) + && *myitem.buf[i]; i++); getdata(b_lines - 1, 0, "(S)儲存 (E)重新來過 (Q)取消?[S] ", buf, 3, LCECHO); @@ -424,7 +425,8 @@ static int x_archie() { strcpy(genbuf1, buf); sprintf(buf, BBSHOME "/tmp/archie.%s", cuser.userid); if(dashf(buf)) { - getdata(0, 0, "要將結果寄回信箱嗎(Y/N)?[N]", ans, 3, DOECHO,0); + getdata(0, 0, "要將結果寄回信箱嗎(Y/N)?[N]", + ans, sizeof(ans), DOECHO, 0); if(*ans == 'y') { fileheader_t mhdr; char title[128], buf1[80]; -- cgit v1.2.3