• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)


Commit MetaInfo

修訂0b2078a75ace719f4c7ac7c6d79750fd961bf5d0 (tree)
時間2022-08-22 23:15:55
作者Adam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Fixed: V_RemoveTrailingCrap couldn't remove a trailing color code that was formatted like "\c[X[[[]".

Change Summary

差異

diff -r 87d43eb8bd82 -r 0b2078a75ace src/v_text.cpp
--- a/src/v_text.cpp Sun Aug 21 23:34:57 2022 -0400
+++ b/src/v_text.cpp Mon Aug 22 10:15:55 2022 -0400
@@ -774,10 +774,12 @@
774774 int i = 0;
775775 for ( i = ulStringLength-2; i >= 2; --i )
776776 {
777- if ( pszString[i] == '[' )
777+ // [AK] We should keep checking for "\c[" until we reach the beginning of the string,
778+ // in case the string contains something like "\c[X[[[]".
779+ if ( ( pszString[i] == '[' ) && V_ColorCodeStart ( pszString, i-2 ) )
778780 break;
779781 }
780- if ( ( i >= 2 ) && V_ColorCodeStart ( pszString, i-2 ) )
782+ if ( i >= 2 )
781783 {
782784 pszString[i-2] = 0;
783785 ulStringLength = static_cast<ULONG>(strlen( pszString ));