mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 19:17:27 -04:00
check correct index on file handle
always worked before because all callers were checking 0 anyways closes #2442
This commit is contained in:
parent
4075d6f16b
commit
5288efaa6a
@ -245,7 +245,7 @@ class FileSystem(val fileSystem: IFileSystem, var label: Label, val host: Option
|
||||
def checkHandle(args: Arguments, index: Int) = {
|
||||
if (args.isInteger(index)) {
|
||||
args.checkInteger(index)
|
||||
} else args.checkAny(0) match {
|
||||
} else args.checkAny(index) match {
|
||||
case handle: HandleValue => handle.handle
|
||||
case _ => throw new IOException("bad file descriptor")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user