3131#include "bits.h"
3232#include "static_assert.h"
3333
34- #define BIGDECIMAL_VERSION "3.1.8 "
34+ #define BIGDECIMAL_VERSION "3.1.9 "
3535
3636/* #define ENABLE_NUMERIC_STRING */
3737
@@ -5277,7 +5277,7 @@ VP_EXPORT Real *
52775277VpAlloc (size_t mx , const char * szVal , int strict_p , int exc )
52785278{
52795279 const char * orig_szVal = szVal ;
5280- size_t i , j , ni , ipf , nf , ipe , ne , dot_seen , exp_seen , nalloc ;
5280+ size_t i , j , ni , ipf , nf , ipe , ne , exp_seen , nalloc ;
52815281 size_t len ;
52825282 char v , * psz ;
52835283 int sign = 1 ;
@@ -5363,13 +5363,11 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
53635363 ne = 0 ; /* number of digits in the exponential part */
53645364 ipf = 0 ; /* index of the beginning of the fractional part */
53655365 ipe = 0 ; /* index of the beginning of the exponential part */
5366- dot_seen = 0 ;
53675366 exp_seen = 0 ;
53685367
53695368 if (v != '\0' ) {
53705369 /* Scanning fractional part */
53715370 if ((psz [i ] = szVal [j ]) == '.' ) {
5372- dot_seen = 1 ;
53735371 ++ i ;
53745372 ++ j ;
53755373 ipf = i ;
@@ -5385,9 +5383,6 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
53855383 }
53865384 if (!strict_p ) {
53875385 v = psz [i ] = '\0' ;
5388- if (nf == 0 ) {
5389- dot_seen = 0 ;
5390- }
53915386 break ;
53925387 }
53935388 goto invalid_value ;
@@ -5458,7 +5453,7 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
54585453
54595454 psz [i ] = '\0' ;
54605455
5461- if (strict_p && ((( ni == 0 || dot_seen ) && nf == 0 ) || (exp_seen && ne == 0 ))) {
5456+ if (strict_p && ((ni == 0 && nf == 0 ) || (exp_seen && ne == 0 ))) {
54625457 VALUE str ;
54635458 invalid_value :
54645459 if (!strict_p ) {
0 commit comments