fix: remove confusing ReadSeString API in MemoryHelper.cs

This commit is contained in:
goat 2021-08-14 21:31:03 +02:00
parent ac9ed6490b
commit b992325470
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -207,21 +207,13 @@ namespace Dalamud.Memory
return eosPos >= 0 ? data.Substring(0, eosPos) : data;
}
/// <summary>
/// Read an SeString from a specified memory address.
/// </summary>
/// <param name="memoryAddress">The memory address to read from.</param>
/// <returns>The read in string.</returns>
public static SeString ReadSeString(IntPtr memoryAddress)
=> ReadSeString(memoryAddress, 256);
/// <summary>
/// Read an SeString from a specified memory address.
/// </summary>
/// <param name="memoryAddress">The memory address to read from.</param>
/// <param name="maxLength">The maximum length of the string.</param>
/// <returns>The read in string.</returns>
public static SeString ReadSeString(IntPtr memoryAddress, int maxLength)
public static SeString ReadSeString(IntPtr memoryAddress, int maxLength = 256)
{
ReadRaw(memoryAddress, maxLength, out var buffer);