mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
fixes error in -0 check
This commit is contained in:
parent
07b2d65e30
commit
39b1c0cb66
1 changed files with 1 additions and 1 deletions
|
@ -1502,7 +1502,7 @@ public class JSONObject {
|
|||
try {
|
||||
if (string.indexOf('.') > -1 || string.indexOf('e') > -1
|
||||
|| string.indexOf('E') > -1
|
||||
|| "0".equals(string.substring(1))) {
|
||||
|| "-0".equals(string)) {
|
||||
d = Double.valueOf(string);
|
||||
if (!d.isInfinite() && !d.isNaN()) {
|
||||
return d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue