From 6fc41f57fc607df9b07446ca45bdf754225c9bd9 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 5 Jul 2023 13:18:22 +0200 Subject: tools/idevicecrashreport: Silence compiler warning --- tools/idevicecrashreport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index 484212e..09bd537 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c @@ -163,7 +163,7 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char char* p = strrchr(list[k], '.'); if (p != NULL && !strncmp(p, ".synced", 7)) { /* make sure to strip ".synced" extension as seen on iOS 5 */ - int newlen = strlen(list[k]) - 7; + size_t newlen = p - list[k]; strncpy(((char*)target_filename) + host_directory_length, list[k], newlen); target_filename[host_directory_length + newlen] = '\0'; } else { -- cgit v1.1-32-gdbae