xpressn.c, fetchid(), #9/15 reorder

This commit is contained in:
rlar 2015-10-10 16:33:10 +02:00
parent 3fea077ebe
commit 16b53e3784
1 changed files with 4 additions and 3 deletions

View File

@ -712,10 +712,11 @@ fetchid(SPICE_DSTRINGPTR t, const char *s, const char *s_end)
do
{
c = *s++;
if (s > s_end)
if (s >= s_end)
break;
c = *s++;
// facts: upcase('\0') == '\0'
// facts: alfanum('\0') == false
// facts: alfanum(upcase(x)) == alfanum(x)
@ -729,7 +730,7 @@ fetchid(SPICE_DSTRINGPTR t, const char *s, const char *s_end)
} while (1);
return s - 1; /* return updated s */
return s;
}