From acf4a98784191a05934e633542bc1a3927e0f84f Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 14 Jul 2024 23:23:30 +0200 Subject: [PATCH] Ensure AtkValue is even set before reading it as string --- GameUI/LAtkValue.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GameUI/LAtkValue.cs b/GameUI/LAtkValue.cs index 427e7f6..70982ff 100644 --- a/GameUI/LAtkValue.cs +++ b/GameUI/LAtkValue.cs @@ -7,6 +7,8 @@ public static class LAtkValue { public static unsafe string? ReadAtkString(this AtkValue atkValue) { + if (atkValue.Type == ValueType.Undefined) + return null; if (atkValue.String != null) return MemoryHelper.ReadSeStringNullTerminated(new nint(atkValue.String)).ToString(); return null;