Skip to content

Commit 94af94a

Browse files
committed
Fixed variable naming
- we fetch the column count here, so we're iterating over the number of columns, not rows
1 parent fcac520 commit 94af94a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/statement.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,9 +835,9 @@ Napi::Value Statement::RowToJS(Napi::Env env, Row* row) {
835835
}
836836

837837
void Statement::GetRow(Row* row, sqlite3_stmt* stmt) {
838-
int rows = sqlite3_column_count(stmt);
838+
int cols = sqlite3_column_count(stmt);
839839

840-
for (int i = 0; i < rows; i++) {
840+
for (int i = 0; i < cols; i++) {
841841
int type = sqlite3_column_type(stmt, i);
842842
const char* name = sqlite3_column_name(stmt, i);
843843
switch (type) {

0 commit comments

Comments
 (0)