diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2005-10-31 23:55:46 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2005-10-31 23:55:46 +0000 |
commit | 596536451fef790a9b31a9f4009fbf2ac368b2f3 (patch) | |
tree | 7f683021ef082412f76c6ebbf683e95c50dc8061 | |
parent | 54bf7f19156e1c361aa25a36dbdc1e4070305aa8 (diff) | |
download | libgpod-596536451fef790a9b31a9f4009fbf2ac368b2f3.tar.gz libgpod-596536451fef790a9b31a9f4009fbf2ac368b2f3.tar.xz libgpod-596536451fef790a9b31a9f4009fbf2ac368b2f3.zip |
* itdb_itunesdb.c (get16lint): fixed bug affecting big endian
systems. Thanks to Martin Aumueller for spotting this.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1131 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/itdb_itunesdb.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2005-11-01 Jorg Schuler <jcsjcs at users.sourceforge.net> + + * itdb_itunesdb.c (get16lint): fixed bug affecting big endian + systems. Thanks to Martin Aumueller for spotting this. + 2005-10-25 Jorg Schuler <jcsjcs at users.sourceforge.net> * itdb_itunesdb.c (itdb_parse): added comment, check for itdb diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 3efe40c..173215f 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-10-26 01:00:07 jcs> +/* Time-stamp: <2005-11-01 08:55:02 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -126,7 +126,7 @@ #define ITUNESDB_DEBUG 0 #define ITUNESDB_MHIT_DEBUG 0 -#define ITUNESDB_COPYBLK 262144 /* blocksize for cp () */ +#define ITUNESDB_COPYBLK (1024*1024*4) /* blocksize for cp () */ /* Note: some of the comments for the MHOD_IDs are copied verbatim @@ -411,12 +411,12 @@ static guint8 get8int (FContents *cts, glong seek) encoding. On error the GError in @cts is set. */ static guint16 get16lint (FContents *cts, glong seek) { - guint32 n=0; + guint16 n=0; if (check_seek (cts, seek, 2)) { g_return_val_if_fail (cts->contents, 0); - memcpy (&n, &cts->contents[seek], 4); + memcpy (&n, &cts->contents[seek], 2); # if (G_BYTE_ORDER == G_BIG_ENDIAN) n = GUINT16_SWAP_LE_BE (n); # endif |