Bugfix: using correct column.
authorGustavo Lima Chaves <glima@profusion.mobi>
Fri, 19 Sep 2008 15:17:13 +0000 (12:17 -0300)
committerGustavo Lima Chaves <glima@profusion.mobi>
Fri, 19 Sep 2008 15:17:59 +0000 (12:17 -0300)
src/lib/lightmediascanner_db_common.c

index 9f4bad3..ebd0d17 100644 (file)
@@ -286,7 +286,7 @@ lms_db_table_version_get(sqlite3 *db, const char *table)
     if (r == SQLITE_DONE)
         version = 0;
     else if (r == SQLITE_ROW)
-        version = sqlite3_column_int(stmt, 1);
+        version = sqlite3_column_int(stmt, 0);
     else {
         version = -1;
         fprintf(stderr, "ERROR: could not get table '%s' version: %s\n",