]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/parser/expr_evaluator.cpp
mtime: Minimize imprecision and prevent overflow on darwin.
[vlc] / modules / gui / skins2 / parser / expr_evaluator.cpp
index 8b504ca1bff06359bca7fd70d3ea74034d5a6b5f..14f4359f64d36288a65b813fd2099f56726d2367 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * expr_evaluator.cpp
  *****************************************************************************
- * Copyright (C) 2004 VideoLAN
+ * Copyright (C) 2004 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "expr_evaluator.hpp"
@@ -69,7 +69,7 @@ void ExprEvaluator::parse( const string &rExpr )
         {
             // Skip white spaces
             end = begin;
-            while( pString[end] && pString[end] != ' ' )
+            while( pString[end] && pString[end] != ' ' && pString[end] != ')' )
             {
                 end++;
             }
@@ -80,7 +80,7 @@ void ExprEvaluator::parse( const string &rExpr )
             // TODO compare to a set of operators
             if( token == "not" || token == "or" || token == "and" )
             {
-                // Pop the operator stock while the operator has a higher
+                // Pop the operator stack while the operator has a higher
                 // precedence than the top of the stack
                 while( !opStack.empty() &&
                        hasPrecedency( token, opStack.back() ) )