* gnu/gcj/tools/gcj_dbtool/Main.java
(bytesToString): Don't lose zeros from within the digest.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122045
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-02-16 Gary Benson <gbenson@redhat.com>
+
+ * gnu/gcj/tools/gcj_dbtool/Main.java
+ (bytesToString): Don't lose zeros from within the digest.
+
2007-02-15 Andrew Haley <aph@redhat.com>
* Makefile.am (nat_source_files): Remove
StringBuffer hexBytes = new StringBuffer();
int length = b.length;
for (int i = 0; i < length; ++i)
- hexBytes.append(Integer.toHexString(b[i] & 0xff));
+ {
+ int v = b[i] & 0xff;
+ if (v < 16)
+ hexBytes.append('0');
+ hexBytes.append(Integer.toHexString(v));
+ }
return hexBytes.toString();
}