diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-10-07 14:03:18 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-10-07 14:03:18 +0800 |
commit | 2fc837678d408b1916a150bce5d421d0881671c8 (patch) | |
tree | 26bb0bb3a1751a36083f7a8a8f8e2c8e3625838e | |
parent | 5a4329dc960af5d47f9a06c3c01f8b61de3e68f7 (diff) | |
download | pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar.gz pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar.bz2 pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar.lz pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar.xz pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.tar.zst pttbbs-2fc837678d408b1916a150bce5d421d0881671c8.zip |
* pmore: fix unclosed OPTION (#) with only one option may fall into non-stop execution
* pmore: add check to 'goto self frame'
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4908 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/pmore.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/pmore.c b/pttbbs/mbbsd/pmore.c index 4304b55e..3862efaf 100644 --- a/pttbbs/mbbsd/pmore.c +++ b/pttbbs/mbbsd/pmore.c @@ -3523,10 +3523,19 @@ mf_movieExecuteOffsetCmd(unsigned char *s, unsigned char *end) // newno starts from 1 if (newno <= 0) return 0; + + // XXX this is dropping performance... + // need to optimize again someday. + // prevent endless loop + curr = mf_movieCurrentFrameNo(); + if (curr == newno) + return 0; } return mf_movieGotoFrame(newno, curr); case ':': + // XXX need to handle endless loop case + // by names return mf_movieGotoNamedFrame(s+1, end); @@ -3791,6 +3800,10 @@ mf_movieOptionHandler(unsigned char *opt, unsigned char *end) outs(ANSI_RESET); // required because options bar may be not closed pmore_clrtoeol(b_lines, 0); + // if the syntax has error... + if (!maxsel) + return 0; + #ifdef DEBUG prints("selection: %d\n", isel); vkey(); |