mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-20 02:16:58 +00:00
Fix a couple of other bugs with the fs rewrite
- Fix stdin not being considered a "readable" input - Return an unsigned byte rather than a signed one for no-args .read()
This commit is contained in:
parent
51e787f631
commit
7e334bd4a5
@ -118,7 +118,7 @@ public class BinaryReadableHandle extends HandleGeneric
|
||||
{
|
||||
single.clear();
|
||||
int b = m_reader.read( single );
|
||||
return b == -1 ? null : new Object[] { single.get( 0 ) };
|
||||
return b == -1 ? null : new Object[] { single.get( 0 ) & 0xFF };
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
|
@ -63,7 +63,7 @@ handleMetatable = {
|
||||
if self._closed then error("attempt to use a closed file", 2) end
|
||||
|
||||
local handle = self._handle
|
||||
if not handle.read then return nil, "Not opened for reading" end
|
||||
if not handle.read and not handle.readLine then return nil, "Not opened for reading" end
|
||||
|
||||
local n = select('#', ...)
|
||||
local output = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user