Skip to content

Commit d0028d4

Browse files
author
Sam Byass
committed
Lib: Actually use position shift lock when reading string literals
1 parent 8614b17 commit d0028d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LibCpp2IL/Metadata/Il2CppMetadata.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ internal string ReadStringFromIndexNoReadLock(int index)
407407
public string GetStringLiteralFromIndex(uint index)
408408
{
409409
var stringLiteral = stringLiterals[index];
410-
Position = metadataHeader.stringLiteralDataOffset + stringLiteral.dataIndex;
411-
return Encoding.UTF8.GetString(ReadBytes((int) stringLiteral.length));
410+
411+
return Encoding.UTF8.GetString(ReadByteArrayAtRawAddress(metadataHeader.stringLiteralDataOffset + stringLiteral.dataIndex, (int) stringLiteral.length));
412412
}
413413
}
414414
}

0 commit comments

Comments
 (0)