From 93ba8ce17d890147a051c9860091206286b364d7 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sun, 22 Jul 2007 14:15:44 +0000 Subject: [PATCH] changed: the parser is allowed to recognize values which begin with a dot, e.g '.5' is treated as '0.5' git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@46 e52654a7-88a9-db11-a3e9-0013d4bc506e --- ttmath/ttmathbig.h | 2 +- ttmath/ttmathparser.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ttmath/ttmathbig.h b/ttmath/ttmathbig.h index d65a1eb..cd3e733 100644 --- a/ttmath/ttmathbig.h +++ b/ttmath/ttmathbig.h @@ -2734,7 +2734,7 @@ private: /*! - we're testing whether is there a comma operator + we're testing whether there's a comma operator */ bool FromString_TestCommaOperator(const char * & source) { diff --git a/ttmath/ttmathparser.h b/ttmath/ttmathparser.h index b72359a..e0bdc83 100644 --- a/ttmath/ttmathparser.h +++ b/ttmath/ttmathparser.h @@ -1553,7 +1553,10 @@ int character; return 2; } else - if( character=='#' || character=='&' || CharToDigit(character, base)!=-1 ) + if( character=='#' || character=='&' || + character==TTMATH_COMMA_CHARACTER_1 || + (character==TTMATH_COMMA_CHARACTER_2 && TTMATH_COMMA_CHARACTER_2 != 0) || + CharToDigit(character, base)!=-1 ) { /* warning: