Commit 49a2e075 authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed double leading '--' parsing of real numbers

parent 51c08e66
......@@ -784,6 +784,11 @@ public:
fraction /= 10.0;
}
mantissa = fromDecimal(sIntegral);
if (mantissa<0) {
// Extra '-' at start
error = WrongReal;
return 0.0;
}
mantissa += fraction;
exponenta = fromDecimal(sExponenta);
real result = mantissa * ::pow(10, exponenta);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment