ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/radcompare.c
(Generate patch)

Comparing ray/src/util/radcompare.c (file contents):
Revision 2.1 by greg, Mon Oct 15 17:52:52 2018 UTC vs.
Revision 2.2 by greg, Mon Oct 15 18:21:01 2018 UTC

# Line 138 | Line 138 | equiv_string(char *s1, char *s2)
138                                  /* skip whitespace at beginning */
139          while (isspace(*s1)) s1++;
140          while (isspace(*s2)) s2++;
141        if (!strcmp(s1, s2))    /* quick check */
142                return(1);
141          while (*s1) {           /* check each word */
142 <                int     inquote = *s1;
142 >                int     inquote;
143 >                if (!*s2)       /* unexpected EOL in s2? */
144 >                        return(0);
145 >                inquote = *s1;
146                  if ((inquote != '\'') & (inquote != '"'))
147                          inquote = 0;
148                  if (inquote) {  /* quoted text must match exactly */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines