]> source.dussan.org Git - jgit.git/commitdiff
Fix RawParseUtils.formatBase10 to work with negative values 66/1466/2
authorMarc Strapetz <marc.strapetz@syntevo.com>
Tue, 31 Aug 2010 11:19:48 +0000 (13:19 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 31 Aug 2010 18:20:54 +0000 (11:20 -0700)
Change-Id: Iffa220de76c5e180796fa46c4d67f52a1b3b2e35
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java

index 38e0ddefde0711076b21c0b24d827e11d3cb71de..598ebaeb97c855407ab18b49b4f1e14b9a100a92 100644 (file)
@@ -155,6 +155,8 @@ public final class RawParseUtils {
                        return o;
                }
                final boolean isneg = value < 0;
+               if (isneg)
+                       value = -value;
                while (value != 0) {
                        b[--o] = base10byte[value % 10];
                        value /= 10;