mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
args drop returns scala iterator, no need to cast again, toArray will work
closes #3159
This commit is contained in:
parent
a1d1834597
commit
90be0181bc
@ -259,8 +259,7 @@ class DebugCard(host: EnvironmentHost) extends prefab.ManagedEnvironment with De
|
||||
checkAccess()
|
||||
val destination = args.checkString(0)
|
||||
DebugNetwork.getEndpoint(destination).filter(_ != this).foreach{endpoint =>
|
||||
// Cast to iterable to use Scala's toArray instead of the Arguments' one (which converts byte arrays to Strings).
|
||||
val packet = Network.newPacket(node.address, destination, 0, args.drop(1).asInstanceOf[java.lang.Iterable[AnyRef]].toArray)
|
||||
val packet = Network.newPacket(node.address, destination, 0, args.drop(1).toArray)
|
||||
endpoint.receivePacket(packet)
|
||||
}
|
||||
result()
|
||||
|
Loading…
x
Reference in New Issue
Block a user