]> git.sesse.net Git - vlc/commitdiff
* skins2/parser/interpreter.cpp: Fixed a crash when using an action of the form...
authorOlivier Teulière <ipkiss@videolan.org>
Mon, 24 Apr 2006 21:57:04 +0000 (21:57 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Mon, 24 Apr 2006 21:57:04 +0000 (21:57 +0000)
modules/gui/skins2/parser/interpreter.cpp

index db544a96662293d196f5a901c4b2a0061560ff9a..9bce12bf9b81d877a46d59374d2474d4b2897885 100644 (file)
@@ -174,6 +174,14 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
             // Now remove any whitespace at the beginning of the right part,
             // and go on checking for further actions in it...
             rightPart = rightPart.substr( pos, rightPart.size() );
+            if ( rightPart.find_first_not_of( " \t;" ) == string::npos )
+            {
+                // The right part is completely buggy, it's time to leave the
+                // loop...
+                rightPart = "";
+                break;
+            }
+
             rightPart =
                 rightPart.substr( rightPart.find_first_not_of( " \t;" ),
                                   rightPart.size() );