|
|
|
@ -164,8 +164,7 @@ ecpg_strndup(const char *str, size_t len) |
|
|
|
int |
|
|
|
int |
|
|
|
deccvasc(char *cp, int len, decimal *np) |
|
|
|
deccvasc(char *cp, int len, decimal *np) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char *str = ecpg_strndup(cp, len); /* decimal_in always converts
|
|
|
|
char *str; |
|
|
|
* the complete string */ |
|
|
|
|
|
|
|
int ret = 0; |
|
|
|
int ret = 0; |
|
|
|
numeric *result; |
|
|
|
numeric *result; |
|
|
|
|
|
|
|
|
|
|
|
@ -173,6 +172,7 @@ deccvasc(char *cp, int len, decimal *np) |
|
|
|
if (risnull(CSTRINGTYPE, cp)) |
|
|
|
if (risnull(CSTRINGTYPE, cp)) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str = ecpg_strndup(cp, len); /* decimal_in always converts the complete string */ |
|
|
|
if (!str) |
|
|
|
if (!str) |
|
|
|
ret = ECPG_INFORMIX_NUM_UNDERFLOW; |
|
|
|
ret = ECPG_INFORMIX_NUM_UNDERFLOW; |
|
|
|
else |
|
|
|
else |
|
|
|
|