Skip to content

Commit

Permalink
Fix bug with JSON parser
Browse files Browse the repository at this point in the history
  • Loading branch information
boxbeam committed Sep 4, 2022
1 parent fec4958 commit 425f0df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion res/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: RedLib
main: redempt.redlib.RedLib
version: 2022-08-18 18:37
version: 2022-09-04 18:38
author: Redempt
api-version: 1.13
load: STARTUP
3 changes: 2 additions & 1 deletion src/redempt/redlib/json/JSONParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ private long integer() {

private double decimal(long first) {
assertChar('.');
int start = pos;
long second = integer();
double decimal = second * Math.pow(0.1, Math.ceil(Math.log10(second)));
double decimal = second * Math.pow(0.1, pos - start);
return first < 0 ? first - decimal : decimal + first;
}

Expand Down

0 comments on commit 425f0df

Please sign in to comment.