diff options
| author | Marc Strapetz | 2010-08-31 11:19:48 +0000 |
|---|---|---|
| committer | Shawn O. Pearce | 2010-08-31 18:20:54 +0000 |
| commit | 80f4947e8b2f635eb4a20e54671726b9f9b196b4 (patch) | |
| tree | 0b18b277a1ed51ba3888d51b62474f15d6778825 | |
| parent | b7465b8fe58181ed563f4eef1eee5cb547ec6986 (diff) | |
| download | jgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.tar.gz jgit-80f4947e8b2f635eb4a20e54671726b9f9b196b4.tar.xz 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.java | 2 |
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; |
