Skip to content

Commit 810d85c

Browse files
committed
Improvements and tests before release
1 parent cd75923 commit 810d85c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/ESP32FS.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,9 @@ private String getBuildFolderPath(Sketch s) {
154154
}
155155

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

163162
private long getIntPref(String name){

0 commit comments

Comments
 (0)