summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db-artwork-writer.c')
-rw-r--r--src/db-artwork-writer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index 21b6a91..50e65b3 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -1086,8 +1086,8 @@ ipod_write_photo_db (Itdb_PhotoDB *photodb)
g_free (filename);
return -1;
}
- id_max = itdb_get_free_photo_id( photodb );
- bytes_written = write_mhfd (&db, buf, id_max);
+ id_max = itdb_get_max_photo_id( photodb );
+ bytes_written = write_mhfd (&db, buf, id_max+1);
/* Refcount of the shared buffer should drop to 0 and this should
* sync buffered data to disk