Browse Source

Fix RawParseUtils.formatBase10 to work with negative values

Change-Id: Iffa220de76c5e180796fa46c4d67f52a1b3b2e35
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
stable-0.9
Marc Strapetz 14 years ago committed by Shawn O. Pearce
parent
commit
80f4947e8b
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java

2
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;

Loading…
Cancel
Save