diff --git a/Client/src/net/ME1312/SubData/Client/Library/OutputStreamL1.java b/Client/src/net/ME1312/SubData/Client/Library/OutputStreamL1.java index de830b4..adaaded 100644 --- a/Client/src/net/ME1312/SubData/Client/Library/OutputStreamL1.java +++ b/Client/src/net/ME1312/SubData/Client/Library/OutputStreamL1.java @@ -122,7 +122,7 @@ private void flush() { } } private int flushMBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / MBB), 256); + int size = Math.min(stored / MBB, 256); int length = size * MBB; out.write('\u0013'); out.write((byte) (size - 1)); @@ -131,7 +131,7 @@ private int flushMBB() throws IOException { return length; } private int flushKBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / KBB), 256); + int size = Math.min(stored / KBB, 256); int length = size * KBB; out.write('\u0012'); out.write((byte) (size - 1)); @@ -140,7 +140,7 @@ private int flushKBB() throws IOException { return length; } private int flushBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / BB), 256); + int size = Math.min(stored / BB, 256); int length = size * BB; out.write('\u0011'); out.write((byte) (size - 1)); diff --git a/Server/src/net/ME1312/SubData/Server/Library/OutputStreamL1.java b/Server/src/net/ME1312/SubData/Server/Library/OutputStreamL1.java index 0528069..5d048b3 100644 --- a/Server/src/net/ME1312/SubData/Server/Library/OutputStreamL1.java +++ b/Server/src/net/ME1312/SubData/Server/Library/OutputStreamL1.java @@ -122,7 +122,7 @@ private void flush() { } } private int flushMBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / MBB), 256); + int size = Math.min(stored / MBB, 256); int length = size * MBB; out.write('\u0013'); out.write((byte) (size - 1)); @@ -131,7 +131,7 @@ private int flushMBB() throws IOException { return length; } private int flushKBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / KBB), 256); + int size = Math.min(stored / KBB, 256); int length = size * KBB; out.write('\u0012'); out.write((byte) (size - 1)); @@ -140,7 +140,7 @@ private int flushKBB() throws IOException { return length; } private int flushBB() throws IOException { - int size = Math.min((int) Math.floor((double) stored / BB), 256); + int size = Math.min(stored / BB, 256); int length = size * BB; out.write('\u0011'); out.write((byte) (size - 1));