summaryrefslogtreecommitdiffstats
path: root/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-07-04 21:04:26 +0200
committerGravatar Nikias Bassen2012-07-04 21:04:26 +0200
commit6d9cc73e983b5e950b21f172af2a727c8711cba8 (patch)
tree99a13ed905852b5dceae31aa20892d6393ab835e /libirecovery.c
parent648eeecea5bf029513e0266a47d7b0cb4e62d1b8 (diff)
downloadlibirecovery-6d9cc73e983b5e950b21f172af2a727c8711cba8.tar.gz
libirecovery-6d9cc73e983b5e950b21f172af2a727c8711cba8.tar.bz2
CPID/BDID are actually hex values
Diffstat (limited to 'libirecovery.c')
-rw-r--r--libirecovery.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libirecovery.c b/libirecovery.c
index d6b1c5b..e99c16a 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -1077,7 +1077,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;
}
@@ -1089,7 +1089,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;
}
@@ -1102,7 +1102,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;
}