Skip to content
Snippets Groups Projects
Commit 93d427a4 authored by David Norlin's avatar David Norlin
Browse files

The parser thought that the string "23..24" should be split like:

"23.", ".24".  I think this will fix it.

Rev: lib/modules/Parser.pmod/Pike.pmod:1.5
parent fa95e634
No related branches found
No related tags found
No related merge requests found
...@@ -62,10 +62,17 @@ array(string) split(string data) ...@@ -62,10 +62,17 @@ array(string) split(string data)
case '.': case '.':
if(data[start..start+2]=="...") if(data[start..start+2]=="...")
{
pos+=3;
break;
}
if(data[start..start+1]=="..")
{ {
pos+=2; pos+=2;
break; break;
} }
pos++;
break;
case '0'..'9': case '0'..'9':
if(data[pos]=='0' && (data[pos+1]=='x' || data[pos+1]=='X')) if(data[pos]=='0' && (data[pos+1]=='x' || data[pos+1]=='X'))
...@@ -86,7 +93,7 @@ array(string) split(string data) ...@@ -86,7 +93,7 @@ array(string) split(string data)
break; break;
} }
while(data[pos]>='0' && data[pos]<='9') pos++; while(data[pos]>='0' && data[pos]<='9') pos++;
if(data[pos]=='.') if(data[pos]=='.' && data[pos+1]>='0' && data[pos+1]<='9')
{ {
pos++; pos++;
while(data[pos]>='0' && data[pos]<='9') pos++; while(data[pos]>='0' && data[pos]<='9') pos++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment