1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix to ensure that Addr2Line will not throw unexpected number

formatting exceptions.
PR 152853
This commit is contained in:
Thomas Fletcher 2006-08-04 16:12:59 +00:00
parent 28f387019d
commit b2b00e4be1

View file

@ -117,7 +117,11 @@ public class Addr2line {
int colon = line.lastIndexOf(':'); int colon = line.lastIndexOf(':');
String number = line.substring(colon + 1); String number = line.substring(colon + 1);
if (!number.startsWith("0")) { //$NON-NLS-1$ if (!number.startsWith("0")) { //$NON-NLS-1$
return Integer.parseInt(number); try {
return Integer.parseInt(number);
} catch(Exception ex) {
return -1;
}
} }
} }
} }