From 8fb006a666041a4da38719bb607c694e19088a54 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 7 May 2023 10:32:24 +0200 Subject: [PATCH] fix #3596 --- changelog.md | 1 + .../li/cil/oc/integration/computercraft/DriverPeripheral.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index cfd9d8a6d8..7ecb97c8bb 100644 --- a/changelog.md +++ b/changelog.md @@ -28,6 +28,7 @@ * Changed: The game now crashes instead of reloading defaults if a config file is present but invalid. * Fixed: [#3588] Renaming over other files does not properly free space. * Fixed: [#3591] Memory leak with wrapped worlds from other mods. +* Fixed: [#3596] Freeze when connecting a ComputerCraft peripheral via an Adapter (Kosmos-Prime) * Fixed: [#3603] computer.getDeviceInfo doesn't pause the computer immediately (AR2000AR) * Fixed: [#3609] Swapped arguments in a graphics card "bitblt()" edge case. (Kosmos-Prime) * Removed: Native Lua library support for x86 (32-bit) macOS. diff --git a/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java b/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java index 358c273947..089cbd4cbf 100644 --- a/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java +++ b/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java @@ -121,7 +121,7 @@ public Object[] invoke(final String method, final Context context, final Argumen @Override public void onConnect(final Node node) { super.onConnect(node); - if (node.host() instanceof Context) { + if (node.host() instanceof Context && !accesses.containsKey(node.address())) { final FakeComputerAccess access = new FakeComputerAccess(this, (Context) node.host()); accesses.put(node.address(), access); peripheral.attach(access);