From 1e43425621629678f883541d6974859762e7ebab Mon Sep 17 00:00:00 2001 From: Punikekk Date: Wed, 1 Nov 2023 22:26:33 +0100 Subject: [PATCH] fix not using threadsafe readString in FlashList --- .../github/manolo8/darkbot/core/objects/swf/FlashList.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/manolo8/darkbot/core/objects/swf/FlashList.java b/src/main/java/com/github/manolo8/darkbot/core/objects/swf/FlashList.java index 9278733a8..089560c4c 100644 --- a/src/main/java/com/github/manolo8/darkbot/core/objects/swf/FlashList.java +++ b/src/main/java/com/github/manolo8/darkbot/core/objects/swf/FlashList.java @@ -238,7 +238,9 @@ private FlashVector(Class valueType) { @Override public void update(long address) { if (this.address != address && valueType == null) { - String type = Main.API.readString(address, 32, 48, 144); + String type = threadSafe + ? Main.API.readStringDirect(address, 32, 48, 144) + : Main.API.readString(address, 32, 48, 144); switch (type) { case "uint": case "int":