2007-02-16 Gary Benson <gbenson@redhat.com>

* gnu/gcj/tools/gcj_dbtool/Main.java
	(bytesToString): Don't lose zeros from within the digest.

From-SVN: r122045
This commit is contained in:
Gary Benson 2007-02-16 14:54:25 +00:00 committed by Gary Benson
parent 01bc4081b3
commit 2c39a2b1e9
5 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -429,7 +429,12 @@ public class Main
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();
}