From 5f676c10c6d21c7dca7733d7edb3e79c7174a664 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Teuli=C3=A8re?= Date: Tue, 18 May 2004 18:47:02 +0000 Subject: [PATCH] * skins2/utils/var_text.cpp: avoid an infinite loop when $H is specified in a help string --- modules/gui/skins2/utils/var_text.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gui/skins2/utils/var_text.cpp b/modules/gui/skins2/utils/var_text.cpp index dd16ad01a7..2146618d42 100755 --- a/modules/gui/skins2/utils/var_text.cpp +++ b/modules/gui/skins2/utils/var_text.cpp @@ -61,7 +61,10 @@ const UString VarText::get() const // $V for volume) UString temp( m_text ); - while( (pos = temp.find( "$H" )) != UString::npos ) + // $H is processed first, in case the help string contains other variables + // to replace. And it is replaced only once, in case one of these other + // variables is $H... + if( (pos = temp.find( "$H" )) != UString::npos ) { VarManager *pVarManager = VarManager::instance( getIntf() ); // We use .getRaw() to avoid replacing the $H recursively! -- 2.39.2