diff --git a/src/main/java/dan200/computercraft/shared/network/server/UploadFileMessage.java b/src/main/java/dan200/computercraft/shared/network/server/UploadFileMessage.java index 64f854a80..38c924789 100644 --- a/src/main/java/dan200/computercraft/shared/network/server/UploadFileMessage.java +++ b/src/main/java/dan200/computercraft/shared/network/server/UploadFileMessage.java @@ -160,6 +160,7 @@ public class UploadFileMessage extends ComputerServerMessage contents.position( currentOffset ).limit( currentOffset + canWrite ); slices.add( new FileSlice( fileId, currentOffset, contents.slice() ) ); currentOffset += canWrite; + remaining -= canWrite; } contents.position( 0 ).limit( capacity );