The following reply was made to PR mod_include/1139; it has been noted by GNATS.
From: Dean Gaudet <[EMAIL PROTECTED]>
To: Brian Slesinsky <[EMAIL PROTECTED]>
Subject: Re: mod_include/1139: parse_expr() evaluates some expressions
containing && or || incorrectly
Date: Thu, 18 Sep 1997 01:42:37 -0700 (PDT)
On Tue, 16 Sep 1997, Brian Slesinsky wrote:
> It appears to be because the code to evaluate strings in lines 1327-1357 of
> mod_include.c never sets current->left->value or current->right->value.
> Perhaps replacing the switch() statements with the default case (so strings
> are
> always evaluated in the same place) would fix the problem.
Right ... this should fix it.
Dean
--- mod_include.c.dist Thu Sep 18 01:33:45 1997
+++ mod_include.c Thu Sep 18 01:40:47 1997
@@ -1332,6 +1332,7 @@
strncpy(current->left->token.value, buffer,
MAX_STRING_LEN-1);
current->left->token.value[MAX_STRING_LEN-1] = '\0';
+ current->left->value = (current->token.value[0] != '\0');
current->left->done = 1;
break;
default:
@@ -1347,6 +1348,7 @@
strncpy(current->right->token.value, buffer,
MAX_STRING_LEN-1);
current->right->token.value[MAX_STRING_LEN-1] = '\0';
+ current->right->value = (current->token.value[0] != '\0');
current->right->done = 1;
break;
default: