mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 11:10:29 +00:00
Changes suggested by SquidDev and update help file
This commit is contained in:
parent
f20a7afa7f
commit
4fb0240a36
@ -5,7 +5,6 @@ import dan200.computercraft.api.lua.LuaException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.*;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static dan200.computercraft.core.apis.ArgumentHelper.*;
|
||||
|
||||
@ -119,7 +118,7 @@ public class EncodedInputHandle extends HandleGeneric
|
||||
char[] bytes = new char[ count ];
|
||||
count = m_reader.read( bytes );
|
||||
if( count < 0 ) return null;
|
||||
String str = new String( bytes );
|
||||
String str = new String( bytes, 0, count );
|
||||
return new Object[] { str };
|
||||
}
|
||||
catch( IOException e )
|
||||
|
@ -22,6 +22,7 @@ Functions on files opened with mode "r":
|
||||
readLine()
|
||||
readAll()
|
||||
close()
|
||||
read( number )
|
||||
|
||||
Functions on files opened with mode "w" or "a":
|
||||
write( string )
|
||||
@ -36,4 +37,4 @@ close()
|
||||
Functions on files opened with mode "wb" or "ab":
|
||||
write( byte )
|
||||
flush()
|
||||
close()
|
||||
close()
|
||||
|
Loading…
Reference in New Issue
Block a user