From ed6e6ae373844cdb20e0b334b2b68820309cfe4e Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Tue, 4 Nov 2014 19:33:01 +0300 Subject: [PATCH] Fix bug in Float.intBitsToFloat --- .../src/main/java/org/teavm/classlib/java/lang/TFloat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java index 6e226e54b..56ab410de 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java @@ -277,7 +277,7 @@ public class TFloat extends TNumber implements TComparable { } } boolean negative = (bits & (1 << 31)) != 0; - int rawExp = ((bits >> 23) & 0x7F8) - 127; + int rawExp = (bits >> 23) & 0xFF; int mantissa = bits & 0x7FFFFF; if (rawExp == 0) { mantissa <<= 1;