r6895 - dumbhippo/trunk/client/common/ddm



Author: otaylor
Date: 2007-11-12 14:52:05 -0600 (Mon, 12 Nov 2007)
New Revision: 6895

Modified:
   dumbhippo/trunk/client/common/ddm/ddm-condition-parser.c
Log:
Fix bug in parenthesis handling inside conditions

Modified: dumbhippo/trunk/client/common/ddm/ddm-condition-parser.c
===================================================================
--- dumbhippo/trunk/client/common/ddm/ddm-condition-parser.c	2007-11-12 20:25:52 UTC (rev 6894)
+++ dumbhippo/trunk/client/common/ddm/ddm-condition-parser.c	2007-11-12 20:52:05 UTC (rev 6895)
@@ -128,9 +128,9 @@
 
     level = 1;
     for (i = start + 1; i < len; i++) {
-        if (tokens[start].type == '(') {
+        if (tokens[i].type == '(') {
             level++;
-        } else if (tokens[start].type == ')') {
+        } else if (tokens[i].type == ')') {
             level--;
             if (level == 0)
                 return i + 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]