summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-02-14 21:37:22 +0100
committerGravatar Nikias Bassen2012-02-14 21:37:22 +0100
commit3f225ca3da94432a4a7f3d0bea8563dfffc6f1ea (patch)
tree2bc793810318418cb4b3a022fe010ac8939cf730 /src/libirecovery.c
parentd7f8d0e0824d2213fb9811e9340586d1c704851b (diff)
downloadidevicerestore-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.c6
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;
}