summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFrank Wuerthwein <fkw@ucsd.edu>2009-02-08 22:42:40 +0000
committerFrank Wuerthwein <fkw@ucsd.edu>2009-02-08 22:42:40 +0000
commitfa5e8dbbd81ab86edaaf9d7a925b1be1bb1c86c5 (patch)
tree3acdcb3bcfa410c78fb9d03c5d1e49a972cd021c /src/lib
parent63a0efcb70da81b8d4dbe68745c84e565814fefd (diff)
Return undefined for NaN.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/binaryXHR.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/binaryXHR.js b/src/lib/binaryXHR.js
index fb27f2a..dd0f91b 100644
--- a/src/lib/binaryXHR.js
+++ b/src/lib/binaryXHR.js
@@ -131,7 +131,7 @@ function BinaryFile(strData, iDataOffset, iDataLength) {
var iMantLo=((((iByte3) << 8) + iByte2) << 8) + iByte1;
if (iExpRaw==0) return 0.0;
- if (iExpRaw==0x7ff) return false;
+ if (iExpRaw==0x7ff) return undefined;
var iExp=(iExpRaw & 0x7FF)-1023;
@@ -150,7 +150,7 @@ function BinaryFile(strData, iDataOffset, iDataLength) {
var iMant=((((iByte7 & 0x0F) << 8) + iByte6) << 8) + iByte5;
if (iExpRaw==0) return 0.0;
- if (iExpRaw==0x7ff) return false;
+ if (iExpRaw==0x7ff) return undefined;
var iExp=(iExpRaw & 0x7FF)-1023;