Commit Diff


commit - 0b0bdb50885c888de89592492c7198061933689b
commit + f459035d5797be5280d488d899a5928bcea0e381
blob - edf31954b8d7c26ca7e0061a6bcb525a11a4c851
blob + deb5979ff7a463f44d5173818f6e6aec4e6059a0
--- sqlite3.c
+++ sqlite3.c
@@ -245,8 +245,8 @@ sq3simple(char *sql, StringList *words)
 		sl_add(words, new);
 	}
 
-	if (rv == SQLITE_ERROR) {
-		printf("%% sqlite3_step: %s\n", sqlite3_errmsg(db));
+	if (rv != SQLITE_DONE) {
+		printf("%% sqlite3_step: %s\n", sqlite3_errstr(rv));
 		tlen = -1;
 	}