Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef4a163

Browse files
author
Hiroshi Inoue
committed
1) Fit the precision of floating point to that of server side
(fix by Hiroki kataoka).2) Ensure the definition of atof()(#include stdlib.h). (suggestion by Masaaki Sakaida).
1 parentf7f0b17 commitef4a163

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/interfaces/odbc/convert.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
#include<time.h>
4444
#include<math.h>
45+
#include<stdlib.h>
4546
#include"convert.h"
4647
#include"statement.h"
4748
#include"qresult.h"
@@ -892,12 +893,12 @@ copy_statement_with_parameters(StatementClass *stmt)
892893
break;
893894

894895
caseSQL_C_DOUBLE:
895-
sprintf(param_string,"%f",
896+
sprintf(param_string,"%15g",
896897
*((SDOUBLE*)buffer));
897898
break;
898899

899900
caseSQL_C_FLOAT:
900-
sprintf(param_string,"%f",
901+
sprintf(param_string,"%6g",
901902
*((SFLOAT*)buffer));
902903
break;
903904

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp