getexpress(), transform `<' etc comparisons

This commit is contained in:
rlar 2017-11-18 12:19:28 +01:00
parent d1b25d59bb
commit f2013088a6
1 changed files with 4 additions and 4 deletions

View File

@ -1365,7 +1365,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
do
p++;
while ((p <= ls_ptr - 1) && (*p <= ' '));
while ((p < ls_ptr) && (*p <= ' '));
} else {
@ -1378,7 +1378,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
{
p++;
if (p > ls_ptr - 1)
if (p >= ls_ptr)
c = ';';
else
c = *p;
@ -1390,7 +1390,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
{
p++;
if (p > ls_ptr - 1)
if (p >= ls_ptr)
d = '\0';
else
d = *p;
@ -1400,7 +1400,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
else if (d == ')')
level--;
} while ((p <= ls_ptr - 1) && !((d == ')') && (level <= 0)));
} while ((p < ls_ptr) && !((d == ')') && (level <= 0)));
}
} while (!strchr(",;)}", c)); /* legal separators */