OSSP CVS Repository

ossp - Check-in [1404]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1404
Date: 2001-Dec-04 15:25:06 (local)
2001-Dec-04 14:25:06 (UTC)
User:simons
Branch:
Comment: We support the current_index and startindex tokens only when they're not zero.
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.38 -> 1.39     2 inserted, 2 deleted

ossp-pkg/var/var.c 1.38 -> 1.39

--- var.c        2001/12/04 13:36:37     1.38
+++ var.c        2001/12/04 14:25:06     1.39
@@ -530,7 +530,7 @@
             return VAR_ERR_UNCLOSED_BRACKET_IN_INDEX;
         ++p;
         }
-    else if (*p == config->current_index)
+    else if (config->current_index && *p == config->current_index)
         {
         ++p;
         *result = current_index;
@@ -703,7 +703,7 @@
 
     /* If the next token is START-INDEX, read the index specification. */
 
-    if (*p == config->startindex)
+    if (config->startindex && *p == config->startindex)
         {
         printf("Found START-INDEX: %s\n", p);
         ++p;

CVSTrac 2.0.1