Correctly return len of character data when SQLColAttributes is called with SQL_COLUMN_TYPE_NAME

This commit is contained in:
Nyall Dawson 2020-08-13 12:11:53 +10:00
parent 362938f17c
commit 3f278f3996

View File

@ -839,7 +839,7 @@ SQLRETURN SQL_API SQLColAttributes(
{
const char *type_name = _odbc_get_client_type_name(col);
if (type_name)
snprintf(rgbDesc, cbDescMax, "%s", type_name);
*pcbDesc = snprintf(rgbDesc, cbDescMax, "%s", type_name);
break;
}
case SQL_COLUMN_LENGTH: