Ensure AtkValue is even set before reading it as string
parent
93fac6efb0
commit
acf4a98784
|
@ -7,6 +7,8 @@ public static class LAtkValue
|
||||||
{
|
{
|
||||||
public static unsafe string? ReadAtkString(this AtkValue atkValue)
|
public static unsafe string? ReadAtkString(this AtkValue atkValue)
|
||||||
{
|
{
|
||||||
|
if (atkValue.Type == ValueType.Undefined)
|
||||||
|
return null;
|
||||||
if (atkValue.String != null)
|
if (atkValue.String != null)
|
||||||
return MemoryHelper.ReadSeStringNullTerminated(new nint(atkValue.String)).ToString();
|
return MemoryHelper.ReadSeStringNullTerminated(new nint(atkValue.String)).ToString();
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue