mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
JNI wrapper1: when checking for an out-of-bounds statement column index, perform the is-statement-finalized check before the range check so that the former exception trumps the latter.
FossilOrigin-Name: 0832f9a8e9f574b157c791c5cddc73aff7b2ff403509f5d78f310494d4a7f93d
This commit is contained in:
@ -979,7 +979,7 @@ public final class Sqlite implements AutoCloseable {
|
||||
/** Throws if n is out of range of this statement's result column
|
||||
count. Intended to be used by the columnXyz() methods. */
|
||||
private sqlite3_stmt checkColIndex(int n){
|
||||
if(null==stmt || n<0 || n>=columnCount()){
|
||||
if(n<0 || n>=columnCount()){
|
||||
throw new IllegalArgumentException("Column index "+n+" is out of range.");
|
||||
}
|
||||
return thisStmt();
|
||||
|
Reference in New Issue
Block a user