From: Nathan Bird Date: Wed, 29 Jun 2011 18:56:57 +0000 (-0400) Subject: BUGFIX: when read-data-in-chunks had an off-by-1 error when dealing with strings... X-Git-Tag: v6.0.0~4^2~17 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=ec7fc12be004c1f6ed38271169fb6be0c17d4974 BUGFIX: when read-data-in-chunks had an off-by-1 error when dealing with strings of length (1+ +max-precision+). --- diff --git a/db-odbc/odbc-api.lisp b/db-odbc/odbc-api.lisp index a65f6a0..1e26c45 100644 --- a/db-odbc/odbc-api.lisp +++ b/db-odbc/odbc-api.lisp @@ -926,7 +926,7 @@ as possible second argument) to the desired representation of date/time/timestam (error 'clsql:sql-database-error :message "wrong type. preliminary.")) while (and (= res $SQL_SUCCESS_WITH_INFO) - (> out-len +max-precision+)) + (>= out-len +max-precision+)) do (setf res (%sql-get-data hstmt column-nr c-type data-ptr +max-precision+ out-len-ptr) out-len (deref-pointer out-len-ptr #.$ODBC-LONG-TYPE)))