Modified:
branches/guffert/driver/connect.c
branches/guffert/setupgui/ConfigDSN.c
Log:
fix detecting of truncation of SQLDriverConnect() output string
Modified: branches/guffert/driver/connect.c
===================================================================
--- branches/guffert/driver/connect.c 2007-11-16 19:15:02 UTC (rev 875)
+++ branches/guffert/driver/connect.c 2007-11-19 07:41:29 UTC (rev 876)
@@ -786,7 +786,7 @@
}
/* return SQL_SUCCESS_WITH_INFO if truncated output string */
- if (pcbConnStrOut && cbConnStrOutMax > *pcbConnStrOut)
+ if (pcbConnStrOut && cbConnStrOutMax < *pcbConnStrOut)
{
set_dbc_error(hdbc, "01004", "String data, right truncated.", 0);
rc= SQL_SUCCESS_WITH_INFO;
Modified: branches/guffert/setupgui/ConfigDSN.c
===================================================================
--- branches/guffert/setupgui/ConfigDSN.c 2007-11-16 19:15:02 UTC (rev 875)
+++ branches/guffert/setupgui/ConfigDSN.c 2007-11-19 07:41:29 UTC (rev 876)
@@ -51,7 +51,7 @@
/* serialize to outstr */
if ((*outlen= ds_to_kvpair(ds, outstr, outmax, (SQLWCHAR)';')) == -1)
{
- /* truncated, up to caller to see outmax > *outlen */
+ /* truncated, up to caller to see outmax < *outlen */
*outlen= ds_to_kvpair_len(ds);
outstr[outmax]= 0;
}
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r876 - in branches/guffert: driver setupgui | jbalint | 19 Nov |