Skip to content

Commit

Permalink
Fixed variable naming
Browse files Browse the repository at this point in the history
- we fetch the column count here, so we're iterating over the number of
  columns, not rows
  • Loading branch information
daniellockyer committed Apr 30, 2022
1 parent fcac520 commit 94af94a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ Napi::Value Statement::RowToJS(Napi::Env env, Row* row) {
}

void Statement::GetRow(Row* row, sqlite3_stmt* stmt) {
int rows = sqlite3_column_count(stmt);
int cols = sqlite3_column_count(stmt);

for (int i = 0; i < rows; i++) {
for (int i = 0; i < cols; i++) {
int type = sqlite3_column_type(stmt, i);
const char* name = sqlite3_column_name(stmt, i);
switch (type) {
Expand Down

0 comments on commit 94af94a

Please sign in to comment.