From: Rick L Bird Date: Thu, 5 May 2011 22:21:13 +0000 (-0400) Subject: PennMUSH 1.8.3p11 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=905168ddbf4911c63ae583fc3803585a2c7d14aa;p=cobramush.git PennMUSH 1.8.3p11 Author: captdeaf@gmail.com Date: Mon Oct 26 17:02:18 2009 +0000 PennBug 127 - merge() eating characters. Fixes #152 --- diff --git a/src/funstr.c b/src/funstr.c index 8604afc..713f9b2 100644 --- a/src/funstr.c +++ b/src/funstr.c @@ -691,6 +691,7 @@ FUNCTION(fun_merge) safe_chr(*(ptr++), buff, bp); break; case TAG_START: + case TAG_END: while (*ptr && *ptr != TAG_END) { safe_chr(*(ptr++), buff, bp); } @@ -702,22 +703,6 @@ FUNCTION(fun_merge) while (*ptr && matched[(unsigned char) *ptr]) { ptr++; j++; - switch (*ptr) { - case ESC_CHAR: - safe_ansi_string(as, i, j, buff, bp); - i += j; - j = 0; - while (*ptr && *ptr != 'm') - safe_chr(*(ptr++), buff, bp); - break; - case TAG_START: - safe_ansi_string(as, i, j, buff, bp); - i += j; - j = 0; - while (*ptr && *ptr != TAG_END) - safe_chr(*(ptr++), buff, bp); - break; - } } if (j != 0) { safe_ansi_string(as, i, j, buff, bp); @@ -732,6 +717,7 @@ FUNCTION(fun_merge) free_ansi_string(as); } + /* ARGSUSED */ FUNCTION(fun_tr) {