From 24faac9cc1f2b6a0ab4d27e0c03caa04755c8cbb Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Sat, 10 Jun 2006 10:12:24 +0000 Subject: * src/itdb_device.c (itdb_device_get_ipod_info): compare more than 4 characters of iPod model if the stored model number is more than 4 characters long. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1303 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 6 ++++++ src/itdb_device.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index df67585..9539423 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-10 Jorg Schuler + + * src/itdb_device.c (itdb_device_get_ipod_info): compare more than + 4 characters of iPod model if the stored model number is more + than 4 characters long. + 2006-06-07 Jorg Schuler * src/itdb.h diff --git a/src/itdb_device.c b/src/itdb_device.c index 4f987b8..c239af0 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2006-06-07 23:49:33 jcs> +/* Time-stamp: <2006-06-10 15:14:18 jcs> | | Copyright (C) 2002-2005 Jorg Schuler | Part of the gtkpod project. @@ -502,7 +502,8 @@ itdb_device_get_ipod_info (Itdb_Device *device) for(i=2; ipod_info_table[i].model_number != NULL; i++) { - if(g_strncasecmp(p, ipod_info_table[i].model_number, 4) == 0) + if(g_strncasecmp(p, ipod_info_table[i].model_number, + strlen (ipod_info_table[i].model_number)) == 0) { g_free(model_num); return &ipod_info_table[i]; -- cgit