BUGFIX: when read-data-in-chunks had an off-by-1 error when dealing with strings...
[clsql.git] / db-odbc / odbc-api.lisp
index a65f6a0f63662b710e71af34fb30a253b54d7fff..1e26c4591ef38334a1b8cf01c90c5cb80965e475 100644 (file)
@@ -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)))