aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/compatlib/informix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 8acfc1ecf07..f9af0247653 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -164,9 +164,7 @@ ecpg_strndup(const char *str, size_t len)
int
deccvasc(char *cp, int len, decimal *np)
{
- char *str = ecpg_strndup(cp, len); /* decimal_in always
- * converts the complete
- * string */
+ char *str;
int ret = 0;
numeric *result;
@@ -174,6 +172,7 @@ deccvasc(char *cp, int len, decimal *np)
if (risnull(CSTRINGTYPE, cp))
return 0;
+ str = ecpg_strndup(cp, len); /* decimal_in always converts the complete string */
if (!str)
ret = ECPG_INFORMIX_NUM_UNDERFLOW;
else