diff options
author | Nikias Bassen | 2012-02-14 21:37:22 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-02-14 21:37:22 +0100 |
commit | 3f225ca3da94432a4a7f3d0bea8563dfffc6f1ea (patch) | |
tree | 2bc793810318418cb4b3a022fe010ac8939cf730 /src/libirecovery.c | |
parent | d7f8d0e0824d2213fb9811e9340586d1c704851b (diff) | |
download | idevicerestore-3f225ca3da94432a4a7f3d0bea8563dfffc6f1ea.tar.gz idevicerestore-3f225ca3da94432a4a7f3d0bea8563dfffc6f1ea.tar.bz2 |
libirecovery: cpid/bdid are actually hex values
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r-- | src/libirecovery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index c0a20bd..148dced 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -1081,7 +1081,7 @@ irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid) { if (client->mode == kWTFMode) { char s_cpid[8] = {0,}; strncpy(s_cpid, client->serial, 4); - if (sscanf(s_cpid, "%d", cpid) != 1) { + if (sscanf(s_cpid, "%x", cpid) != 1) { *cpid = 0; return IRECV_E_UNKNOWN_ERROR; } @@ -1093,7 +1093,7 @@ irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid) { *cpid = 0; return IRECV_E_UNKNOWN_ERROR; } - sscanf(cpid_string, "CPID:%d", cpid); + sscanf(cpid_string, "CPID:%x", cpid); return IRECV_E_SUCCESS; } @@ -1106,7 +1106,7 @@ irecv_error_t irecv_get_bdid(irecv_client_t client, unsigned int* bdid) { *bdid = 0; return IRECV_E_UNKNOWN_ERROR; } - sscanf(bdid_string, "BDID:%d", bdid); + sscanf(bdid_string, "BDID:%x", bdid); return IRECV_E_SUCCESS; } |