diff options
author | Nikias Bassen | 2013-09-27 17:10:13 +0200 |
---|---|---|
committer | Nikias Bassen | 2013-09-27 17:10:13 +0200 |
commit | b2619fbc52e9728c57c4ad6f9579327abb0bbc51 (patch) | |
tree | 955f7af8b927c6180dc92a0006f4545880fcf444 /src | |
parent | 6cbdeea4dc871165f90b511ca6b81eb7139709b3 (diff) | |
download | idevicerestore-b2619fbc52e9728c57c4ad6f9579327abb0bbc51.tar.gz idevicerestore-b2619fbc52e9728c57c4ad6f9579327abb0bbc51.tar.bz2 |
ipsw: also check product type in ipsw_get_latest_fw to get largest major version
Diffstat (limited to 'src')
-rw-r--r-- | src/ipsw.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -296,9 +296,12 @@ int ipsw_get_latest_fw(plist_t version_data, const char* product, char** fwurl, do { plist_dict_next_item(n1, iter, &key, &val); if (key) { - long long unsigned int v = strtoull(key, NULL, 10); - if (v > major) - major = v; + plist_t pr = plist_access_path(n1, 3, key, "MobileDeviceSoftwareVersions", product); + if (pr) { + long long unsigned int v = strtoull(key, NULL, 10); + if (v > major) + major = v; + } free(key); } } while (val); |