Skip to content

Commit c19403b

Browse files
committed
Increased read character count (#115).
1 parent fffad05 commit c19403b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ReClass.NET/Memory/RemoteProcess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public string ReadRemoteString(Encoding encoding, IntPtr address, int length)
296296
var sb = new StringBuilder(encoding.GetString(data));
297297
for (var i = 0; i < sb.Length; ++i)
298298
{
299-
if (sb[i] == 0)
299+
if (sb[i] == '\0')
300300
{
301301
sb.Length = i;
302302
break;

ReClass.NET/Nodes/BaseTextPtrNode.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ namespace ReClassNET.Nodes
88
{
99
public abstract class BaseTextPtrNode : BaseNode
1010
{
11+
private const int MaxStringCharacterCount = 256;
12+
1113
public override int MemorySize => IntPtr.Size;
1214

1315
/// <summary>The encoding of the string.</summary>
@@ -30,7 +32,7 @@ public Size DrawText(ViewInfo view, int x, int y, string type)
3032
}
3133

3234
var ptr = view.Memory.ReadIntPtr(Offset);
33-
var text = view.Process.ReadRemoteString(Encoding, ptr, 64);
35+
var text = view.Process.ReadRemoteString(Encoding, ptr, MaxStringCharacterCount);
3436

3537
var origX = x;
3638

0 commit comments

Comments
 (0)