mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-28 16:54:20 +02:00
xpressn.c, fetchid(), #9/15 reorder
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user