Commit 5f676c10 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/utils/var_text.cpp: avoid an infinite loop when $H is specified in

   a help string
parent 98b1b9be
...@@ -61,7 +61,10 @@ const UString VarText::get() const ...@@ -61,7 +61,10 @@ const UString VarText::get() const
// $V for volume) // $V for volume)
UString temp( m_text ); 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() ); VarManager *pVarManager = VarManager::instance( getIntf() );
// We use .getRaw() to avoid replacing the $H recursively! // We use .getRaw() to avoid replacing the $H recursively!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment