From 905168ddbf4911c63ae583fc3803585a2c7d14aa Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Thu, 5 May 2011 18:21:13 -0400 Subject: [PATCH] PennMUSH 1.8.3p11 Author: captdeaf@gmail.com Date: Mon Oct 26 17:02:18 2009 +0000 PennBug 127 - merge() eating characters. Fixes #152 --- src/funstr.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) 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) { -- 2.30.2