From 5288efaa6ace7728fddac4455929a1973460fad7 Mon Sep 17 00:00:00 2001 From: payonel Date: Mon, 16 Oct 2017 18:04:31 -0700 Subject: [PATCH] check correct index on file handle always worked before because all callers were checking 0 anyways closes #2442 --- src/main/scala/li/cil/oc/server/component/FileSystem.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") }