mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -04:00
Merge branch master-MC1.10 into master-MC1.11
This commit is contained in:
commit
5d470f892a
@ -246,6 +246,11 @@ class FileSystem(val fileSystem: IFileSystem, var label: Label, val host: Option
|
|||||||
def checkHandle(args: Arguments, index: Int) = {
|
def checkHandle(args: Arguments, index: Int) = {
|
||||||
if (args.isInteger(index)) {
|
if (args.isInteger(index)) {
|
||||||
args.checkInteger(index)
|
args.checkInteger(index)
|
||||||
|
} else if (args.isTable(index)) {
|
||||||
|
args.checkTable(index).get("handle") match {
|
||||||
|
case handle: Number => handle.intValue()
|
||||||
|
case _ => throw new IOException("bad file descriptor")
|
||||||
|
}
|
||||||
} else args.checkAny(index) match {
|
} else args.checkAny(index) match {
|
||||||
case handle: HandleValue => handle.handle
|
case handle: HandleValue => handle.handle
|
||||||
case _ => throw new IOException("bad file descriptor")
|
case _ => throw new IOException("bad file descriptor")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user