Skip to content

Commit

Permalink
Improvements and tests before release
Browse files Browse the repository at this point in the history
  • Loading branch information
lorol committed Nov 22, 2020
1 parent cd75923 commit 810d85c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ESP32FS.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,9 @@ private String getBuildFolderPath(Sketch s) {
}

private long parseInt(String value){
if(value.endsWith("m") || value.endsWith("M")) return 1024*1024*Long.parseLong(value.substring(0, (value.length() - 1)));
else if(value.endsWith("k") || value.endsWith("K")) return 1024*Long.parseLong(value.substring(0, (value.length() - 1)));
else if(value.startsWith("0x") || value.startsWith("0X")) return Long.parseLong(value.substring(2), 16);
else return Integer.parseInt(value);
if(value.endsWith("m") || value.endsWith("M")) return 1024*1024*Long.decode(value.substring(0, (value.length() - 1)));
else if(value.endsWith("k") || value.endsWith("K")) return 1024*Long.decode(value.substring(0, (value.length() - 1)));
else return Long.decode(value);
}

private long getIntPref(String name){
Expand Down

0 comments on commit 810d85c

Please sign in to comment.