Core: CParser::ReadDouble now allows '.707' (but IsDouble still false)

git-svn-id: svn://ultimatepp.org/upp/trunk@7967 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-12-12 12:54:29 +00:00
parent b4952fc9b6
commit a42853cdfd
2 changed files with 6 additions and 3 deletions

View file

@ -280,7 +280,7 @@ double CParser::ReadDouble() throw(Error)
{
LTIMING("ReadDouble");
int sign = Sgn();
if(!IsDigit(*term))
if(!IsDigit(*term) && *term != '.')
ThrowError("missing number");
double n = 0;
while(IsDigit(*term))

View file

@ -99,8 +99,11 @@ Painter& Painter::Path(CParser& p)
Painter& Painter::Path(const char *path)
{
CParser p(path);
Path(p);
try {
CParser p(path);
Path(p);
}
catch(CParser::Error) {}
return *this;
}