diff options
author | tsmith@ramayana.hindu.god <> | 2007-10-17 11:22:41 -0600 |
---|---|---|
committer | tsmith@ramayana.hindu.god <> | 2007-10-17 11:22:41 -0600 |
commit | 3d203e55e67946e505f85a7d3a4321794ece51fe (patch) | |
tree | 28b48899cdb8d6851fdbfb97fda206c361453761 /libmysql | |
parent | 63ae0223b12199b44605e3f1ac0855e60364f361 (diff) | |
download | mariadb-git-3d203e55e67946e505f85a7d3a4321794ece51fe.tar.gz |
Fix syntax error build problem on Windows (variable was defined
in middle of block)
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 2a92d115ee2..c7bdfc4c42c 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -3876,15 +3876,19 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, sprintf(buff, "%.*f", (int) field->decimals, value); end= strend(buff); } - uint length= (uint) (end-buff); - if (field->flags & ZEROFILL_FLAG && length < field->length && - field->length < MAX_DOUBLE_STRING_REP_LENGTH-1) + { - bmove_upp((char*) buff+field->length,buff+length, length); - bfill((char*) buff, field->length - length,'0'); - length= field->length; + size_t length= end - buff; + if (field->flags & ZEROFILL_FLAG && length < field->length && + field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1) + { + bmove_upp((char*) buff + field->length, buff + length, length); + bfill((char*) buff, field->length - length, '0'); + length= field->length; + } + fetch_string_with_conversion(param, buff, length); } - fetch_string_with_conversion(param, buff, length); + break; } } |