Subj : Rhino bug in parseFloat with + or - To : netscape.public.mozilla.jseng From : junk Date : Wed Aug 11 2004 08:32 pm Hello, I believe I discovered a bug in Rhino's parseFloat implemenation. I'm currently using 1.5R5. If you type parseFloat("+") or parseFloat("-") within the console you'll get a StringIndexOutOfBoundsException. The source is line 296 within the NativeGloba.js_parseFloat() method. The cause is the following two lines of code: if (c == '+' || c == '-') c = s.charAt(++i); If I understand it correctly, parseFloat should return NaN in this situation. Therefore, to correct the problem, I changed those lines to: if (c == '+' || c == '-') { if (len == 1) return ScriptRuntime.NaNobj; c = s.charAt(++i); } Please let me know if this is wrong. Thanks, -Josh .