summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-10-26 11:54:15 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-10-26 11:54:15 +0800
commitd5f292c4e80f8fe182c4a5ddff05cb8703b27377 (patch)
treeb1ad82b06180dfcbc41060bce53df06017cfc54c
parente9e0834ee240032dd172a9f39e6cc4fdc728022f (diff)
downloadpttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar.gz
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar.bz2
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar.lz
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar.xz
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.tar.zst
pttbbs-d5f292c4e80f8fe182c4a5ddff05cb8703b27377.zip
MAX_EDIT_LINE
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@542 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/edit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/edit.c b/pttbbs/mbbsd/edit.c
index 5073d10a..8685dfc5 100644
--- a/pttbbs/mbbsd/edit.c
+++ b/pttbbs/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.19 2002/09/11 07:16:49 kcwu Exp $ */
+/* $Id: edit.c,v 1.20 2002/10/26 03:54:15 in2 Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -268,6 +268,12 @@ split(textline_t * line, int pos)
register char *ptr;
int spcs = indent_spcs();
+#ifdef MAX_EDIT_LINE
+ if( totaln == MAX_EDIT_LINE ){
+ vmsg("MAX_EDIT_LINE exceed");
+ return;
+ }
+#endif
totaln++;
p->len = line->len - pos + spcs;