diff options
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -225,7 +225,7 @@ static void canonicalize(char *out, const char *in) } /* Add a new file to the databse, prompting the user for needed information. */ -static void ftag_add_one_file(sqlite3 *db, int next_id, const char *file) +static void ftag_add_one_file(sqlite3 *db, int *next_id, const char *file) { char sql[2048]; int rc; @@ -307,7 +307,7 @@ static void ftag_add_one_file(sqlite3 *db, int next_id, const char *file) memset(sql, 0, sizeof(sql)); snprintf(sql, sizeof(sql)-1, "INSERT INTO files VALUES(%d, '%s', '%s', '%s', %ld)", - next_id, canonical_name, full_name, description, date); + *next_id, canonical_name, full_name, description, date); rc = sqlite3_exec(db, sql, NULL, NULL, NULL); sqlite3_check(rc, db); (*next_id)++; |
