aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Strapetz <marc.strapetz@syntevo.com>2010-08-31 13:19:48 +0200
committerShawn O. Pearce <spearce@spearce.org>2010-08-31 11:20:54 -0700
commit80f4947e8b2f635eb4a20e54671726b9f9b196b4 (patch)
tree0b18b277a1ed51ba3888d51b62474f15d6778825
parentb7465b8fe58181ed563f4eef1eee5cb547ec6986 (diff)
downloadjgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.tar.gz
jgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.zip
Fix RawParseUtils.formatBase10 to work with negative values
Change-Id: Iffa220de76c5e180796fa46c4d67f52a1b3b2e35 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
index 38e0ddefde..598ebaeb97 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
@@ -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;