diff --git a/src/sqlite.c b/src/sqlite.c index c96841e63f9..6e89ef04287 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -399,7 +399,7 @@ row_to_value (sqlite3_stmt *stmt) int len = sqlite3_column_count (stmt); Lisp_Object values = Qnil; - for (int i = 0; i < len; ++i) + for (int i = len - 1; 0 <= i; i--) { Lisp_Object v = Qnil; @@ -434,7 +434,7 @@ row_to_value (sqlite3_stmt *stmt) values = Fcons (v, values); } - return Fnreverse (values); + return values; } static Lisp_Object