Permalink
Browse files

Don't delete the leading zero in a hex number if the hex number is ju…

…st 0.
  • Loading branch information...
1 parent 9c29580 commit f36d743e9aebea5d1b9eaf60945350486de67581 @colomon colomon committed Jul 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Printf.cs
View
@@ -198,7 +198,7 @@ private struct PrintfFormat {
}
private static string RemoveInitialZero(String s) {
- if (s[0] == '0') {
+ if (s.Length > 1 && s[0] == '0') {
return s.Substring(1);
}
return s;

0 comments on commit f36d743

Please sign in to comment.