DBD::ODBC's get_info() method returns strange results for some
info types, e.g.:
SQL_XOPEN_CLI_YEAR 10000 892942641
instead of
SQL_XOPEN_CLI_YEAR 10000 1995
I'm quite sure the attached patch fixes that.
Steffen
*** DBD-ODBC-0.37-orig/dbdimp.c Sun Feb 10 19:34:36 2002
--- DBD-ODBC-0.37/dbdimp.c Mon Feb 11 20:00:27 2002
***************
*** 2434,2440 ****
retsv = newSViv(*(int *)rgbInfoValue); /* XXX cast */
else if (cbInfoValue != 2 && cbInfoValue != 4) /* must be string */
retsv = newSVpv(rgbInfoValue, 0);
! else if (rgbInfoValue[cbInfoValue+1] == '\0') /* must be string */
retsv = newSVpv(rgbInfoValue, 0);
else if (cbInfoValue == 2) /* short */
retsv = newSViv(*(short *)rgbInfoValue); /* XXX cast */
--- 2434,2440 ----
retsv = newSViv(*(int *)rgbInfoValue); /* XXX cast */
else if (cbInfoValue != 2 && cbInfoValue != 4) /* must be string */
retsv = newSVpv(rgbInfoValue, 0);
! else if (rgbInfoValue[cbInfoValue] == '\0') /* must be string */
retsv = newSVpv(rgbInfoValue, 0);
else if (cbInfoValue == 2) /* short */
retsv = newSViv(*(short *)rgbInfoValue); /* XXX cast */