Skip to content

Commit 39b1c0c

Browse files
author
John J. Aylward
committed
fixes error in -0 check
1 parent 07b2d65 commit 39b1c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

JSONObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ public static Object stringToValue(String string) {
15021502
try {
15031503
if (string.indexOf('.') > -1 || string.indexOf('e') > -1
15041504
|| string.indexOf('E') > -1
1505-
|| "0".equals(string.substring(1))) {
1505+
|| "-0".equals(string)) {
15061506
d = Double.valueOf(string);
15071507
if (!d.isInfinite() && !d.isNaN()) {
15081508
return d;

0 commit comments

Comments
 (0)