commit 1e41f401ddd4b85d85794d0928d0abc7b3af821c
Author: Hector Martin <[email protected]>
Date:   Tue Oct 20 00:42:46 2009 +0200

    Fix array indexing for cbk generation

 src/itdb_sqlite.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index 2d0ffa1..2d7f172 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -1234,8 +1234,8 @@ static void cbk_calc_sha1_of_sha1s (GArray *cbk)
 
     g_assert (cbk->len > CBK_HEADER_SIZE + 20);
 
-    final_sha1 = g_array_index(cbk, unsigned char *, CBK_HEADER_SIZE);
-    sha1s = g_array_index (cbk, unsigned char *, CBK_HEADER_SIZE + 20);
+    final_sha1 = &g_array_index(cbk, guchar, CBK_HEADER_SIZE);
+    sha1s = &g_array_index (cbk, guchar, CBK_HEADER_SIZE + 20);
     final_sha1_len = g_checksum_type_get_length (G_CHECKSUM_SHA1);
     g_assert (final_sha1_len == 20);
 
@@ -1266,8 +1266,8 @@ static gboolean mk_Locations_cbk (Itdb_iTunesDB *itdb, 
const char *dirname)
        return FALSE;
     }
     cbk_calc_sha1_of_sha1s (cbk);
-    final_sha1 = g_array_index (cbk, guchar *, CBK_HEADER_SIZE);
-    cbk_hash72 = g_array_index (cbk, guchar *, 0);
+    final_sha1 = &g_array_index (cbk, guchar, CBK_HEADER_SIZE);
+    cbk_hash72 = &g_array_index (cbk, guchar, 0);
     success = itdb_hash72_compute_hash_for_sha1 (itdb->device, final_sha1,
                                                 cbk_hash72);
     if (!success) {

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to