summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-04-20 13:37:26 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-04-20 13:37:26 +0800
commit6990f98df7419371b152d57b2e16313c4095a8c3 (patch)
treedb7c99ae09873eeb1810c6b3dec27f09691f7b3a /mbbsd/edit.c
parent3d79c9965851605fc46a040f4e1a43f4d9de980d (diff)
downloadpttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar.gz
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar.bz2
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar.lz
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar.xz
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.tar.zst
pttbbs-6990f98df7419371b152d57b2e16313c4095a8c3.zip
fix buffer overflow
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2699 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c5
1 files changed, 1 insertions, 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;