Don't include length of '\0' in SQLGetData pcbValue

SQLGetData() should return the length of the string without the
null terminator.
This commit is contained in:
James Woodcock 2020-10-24 09:47:10 +01:00
parent d0d95f6503
commit 06868e58ae

View File

@ -1676,7 +1676,7 @@ SQLRETURN SQL_API SQLGetData(
return SQL_NO_DATA;
}
if (pcbValue) {
*pcbValue = len + 1 - stmt->pos;
*pcbValue = len - stmt->pos;
}
if (cbValueMax == 0) {
free(str);