aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index bd7e57a..8d78f52 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)++;