summaryrefslogtreecommitdiffstats
path: root/libirecovery.c
diff options
context:
space:
mode:
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;
}