This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
修訂 | 2c280cd262f331f0bc8b1435ecf524a851154577 (tree) |
---|---|
時間 | 2022-10-30 12:16:47 |
作者 | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Fixed: a string containing "\c[X]]" at the end would still treat it as a trailing color code and remove it.
@@ -771,6 +771,10 @@ | ||
771 | 771 | // [BB] Remove trailing color code of type "\c[X]". |
772 | 772 | else if ( pszString[ulStringLength-1] == ']' ) |
773 | 773 | { |
774 | + // [AK] "\c[X]]" is not a trailing color code. | |
775 | + if ( ( ulStringLength > 2 ) && ( pszString[ulStringLength-2] == ']' ) ) | |
776 | + break; | |
777 | + | |
774 | 778 | int i = 0; |
775 | 779 | for ( i = ulStringLength-2; i >= 2; --i ) |
776 | 780 | { |