Merge pull request #185 from mjwoodcock/odbc-string-truncation

Don't include length of '\0' in SQLGetData pcbValue
This commit is contained in:
Evan Miller 2020-11-08 09:19:28 -05:00 committed by GitHub
commit 514e0fded0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);