From da09a1cebe6c673d913de1958b5426ec27b78e55 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Tue, 3 Sep 2013 17:00:20 +0000 Subject: Quick GTMStackTrace fix. I noticed that the format specifier in GTMStackTrace was expecting to print out a hex address preceded by 0X, but the address won't actually be preceded by OX. Adding a # to the format specifier should fix this, I think. I'm not quite sure how to test this change...? DELTA=2 (0 added, 0 deleted, 2 changed) --- Foundation/GTMStackTrace.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Foundation') diff --git a/Foundation/GTMStackTrace.m b/Foundation/GTMStackTrace.m index 0f3215b..3e34ed0 100644 --- a/Foundation/GTMStackTrace.m +++ b/Foundation/GTMStackTrace.m @@ -176,7 +176,7 @@ static NSString *GTMStackTraceFromAddressDescriptors(struct GTMAddressDescriptor fileName = @"??"; } if (descs[i].class_name) { - [trace appendFormat:@"#%-2lu %-35s %0*lX %s[%s %s]", + [trace appendFormat:@"#%-2lu %-35s %#0*lX %s[%s %s]", (unsigned long)i, [fileName UTF8String], // sizeof(void*) * 2 is the length of the hex address (32 vs 64) and + 2 @@ -187,7 +187,7 @@ static NSString *GTMStackTraceFromAddressDescriptors(struct GTMAddressDescriptor descs[i].class_name, (descs[i].symbol ? descs[i].symbol : "??")]; } else { - [trace appendFormat:@"#%-2lu %-35s %0*lX %s()", + [trace appendFormat:@"#%-2lu %-35s %#0*lX %s()", (unsigned long)i, [fileName UTF8String], // sizeof(void*) * 2 is the length of the hex address (32 vs 64) and + 2 -- cgit v1.2.3