diff --git a/src/main/scala/li/cil/oc/server/component/FileSystem.scala b/src/main/scala/li/cil/oc/server/component/FileSystem.scala index 1b529e6fb..2ff739cb4 100644 --- a/src/main/scala/li/cil/oc/server/component/FileSystem.scala +++ b/src/main/scala/li/cil/oc/server/component/FileSystem.scala @@ -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") }