core: reader_read_identifier_or_number: Prepare for M2-Planet.

* src/reader.c (reader_read_identifier_or_number): Prepare for M2-Planet.
This commit is contained in:
Jan Nieuwenhuizen 2019-10-24 21:35:50 +02:00
parent 2e3b0c7dd9
commit ddfa6cf5ee
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 8 additions and 6 deletions

View File

@ -76,13 +76,15 @@ reader_read_identifier_or_number (int c)
int i = 0;
long n = 0;
int negative_p = 0;
if (c == '+' && isdigit (peekchar ()) != 0)
c = readchar ();
else if (c == '-' && (isdigit (peekchar ()) != 0))
{
negative_p = 1;
if (c == '+')
if (isdigit (peekchar ()) != 0)
c = readchar ();
}
if (c == '-')
if (isdigit (peekchar ()) != 0)
{
negative_p = 1;
c = readchar ();
}
while (isdigit (c) != 0)
{
g_buf[i] = c;