We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d902fe5 commit 926ae52Copy full SHA for 926ae52
1 file changed
src/main/java/com/annimon/ownlang/modules/downloader/downloader.java
@@ -63,7 +63,7 @@ private Value downloader(Value... args) {
63
os.write(buffer, 0, readed);
64
downloaded += readed;
65
if (calculateProgressEnabled) {
66
- final int percent = downloaded * 100 / contentLength;
+ final int percent = (int) (downloaded / ((double) contentLength) * 100.0);
67
progressCallback.execute(
68
NumberValue.of(percent),
69
NumberValue.of(downloaded),
0 commit comments