31
31
#include "bits.h"
32
32
#include "static_assert.h"
33
33
34
- #define BIGDECIMAL_VERSION "3.1.8 "
34
+ #define BIGDECIMAL_VERSION "3.1.9 "
35
35
36
36
/* #define ENABLE_NUMERIC_STRING */
37
37
@@ -5277,7 +5277,7 @@ VP_EXPORT Real *
5277
5277
VpAlloc (size_t mx , const char * szVal , int strict_p , int exc )
5278
5278
{
5279
5279
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 ;
5281
5281
size_t len ;
5282
5282
char v , * psz ;
5283
5283
int sign = 1 ;
@@ -5363,13 +5363,11 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
5363
5363
ne = 0 ; /* number of digits in the exponential part */
5364
5364
ipf = 0 ; /* index of the beginning of the fractional part */
5365
5365
ipe = 0 ; /* index of the beginning of the exponential part */
5366
- dot_seen = 0 ;
5367
5366
exp_seen = 0 ;
5368
5367
5369
5368
if (v != '\0' ) {
5370
5369
/* Scanning fractional part */
5371
5370
if ((psz [i ] = szVal [j ]) == '.' ) {
5372
- dot_seen = 1 ;
5373
5371
++ i ;
5374
5372
++ j ;
5375
5373
ipf = i ;
@@ -5385,9 +5383,6 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
5385
5383
}
5386
5384
if (!strict_p ) {
5387
5385
v = psz [i ] = '\0' ;
5388
- if (nf == 0 ) {
5389
- dot_seen = 0 ;
5390
- }
5391
5386
break ;
5392
5387
}
5393
5388
goto invalid_value ;
@@ -5458,7 +5453,7 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
5458
5453
5459
5454
psz [i ] = '\0' ;
5460
5455
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 ))) {
5462
5457
VALUE str ;
5463
5458
invalid_value :
5464
5459
if (!strict_p ) {
0 commit comments