From 6990f98df7419371b152d57b2e16313c4095a8c3 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 20 Apr 2005 05:37:26 +0000 Subject: fix buffer overflow git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2699 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 7316643e..1a632325 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -2446,11 +2446,8 @@ vedit(char *fpath, int saveheader, int *islocal) if (*quote_file) { do_quote(); *quote_file = '\0'; - } - - // if the currline is changed in do_quote, it should be reseted. - if (oldcurrline != curr_buf->currline) curr_buf->firstline = adjustline(curr_buf->firstline, WRAPMARGIN); + } /* No matter you quote or not, just start the cursor from (0,0) */ oldcurrline = curr_buf->currline = curr_buf->firstline; -- cgit v1.2.3