Revision: e43374dbdc10
Author: Landon Fuller <
lan...@bikemonkey.org>
Date: Thu Apr 18 08:34:32 2013
Log: Fix off-by-one error in printing of long module names.
As reported by juliust [at]
unity3d.com:
When formatting a crash report using iOS specific format, it uses this
format string: "%-4ld%-36S0x%0*". If the module name has 36 characters
or more, it appends (ie, there are no spaces between them) with the
address and makes report unparseable. The format string probably should
be: "%-3ld %-35S 0x%0*".
Issue: #59
http://code.google.com/p/plcrashreporter/source/detail?r=e43374dbdc10
Modified:
/Source/PLCrashReportTextFormatter.m
=======================================
--- /Source/PLCrashReportTextFormatter.m Tue Jan 1 14:02:34 2013
+++ /Source/PLCrashReportTextFormatter.m Thu Apr 18 08:34:32 2013
@@ -492,7 +492,7 @@
/* Note that width specifiers are ignored for %@, but work for C
strings.
* UTF-8 is not correctly handled with %s (it depends on the system
encoding), but
* UTF-16 is supported via %S, so we use it here */
- return [NSString stringWithFormat: @"%-4ld%-36S0x%0*" PRIx64 " %@\n",
+ return [NSString stringWithFormat: @"%-4ld%-35S 0x%0*" PRIx64 " %@\n",
(long) frameIndex,
(const uint16_t *)[imageName cStringUsingEncoding:
NSUTF16StringEncoding],
lp64 ? 16 : 8, frameInfo.instructionPointer,