aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Strapetz2010-08-31 07:19:48 (EDT)
committerShawn O. Pearce2010-08-31 14:20:54 (EDT)
commit80f4947e8b2f635eb4a20e54671726b9f9b196b4 (patch)
tree0b18b277a1ed51ba3888d51b62474f15d6778825
parentb7465b8fe58181ed563f4eef1eee5cb547ec6986 (diff)
downloadjgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.zip
jgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.tar.gz
jgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.tar.bz2
Fix RawParseUtils.formatBase10 to work with negative valuesrefs/changes/66/1466/2
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 38e0dde..598ebae 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;