Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
Merge pull request #70 from mloskot/sqlite3-position
Browse files Browse the repository at this point in the history
Refine assert in result_impl::position with SQL_ROW_NUMBER_UNKNOWN
  • Loading branch information
lexicalunit committed Nov 30, 2015
2 parents 9e1d858 + 064ffa5 commit c036ced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nanodbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,8 @@ class result::result_impl
if(!success(rc))
NANODBC_THROW_DATABASE_ERROR(stmt_.native_statement_handle(), SQL_HANDLE_STMT);

NANODBC_ASSERT(pos - 1 + rowset_position_ <= static_cast<SQLULEN>(std::numeric_limits<unsigned long>::max()));
NANODBC_ASSERT(pos == static_cast<SQLULEN>(SQL_ROW_NUMBER_UNKNOWN)
|| pos - 1 + rowset_position_ <= static_cast<SQLULEN>(std::numeric_limits<unsigned long>::max()));
return static_cast<unsigned long>(pos) - 1 + rowset_position_;
}

Expand Down

0 comments on commit c036ced

Please sign in to comment.