Skip to content

Commit 52eacaa

Browse files
committed
UpdateOffsets takes care of the node offset.
1 parent 9ab343e commit 52eacaa

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

ReClass.NET/Nodes/BaseContainerNode.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics.Contracts;
44

@@ -232,13 +232,6 @@ protected void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
232232
return;
233233
}
234234

235-
var offset = IntPtr.Zero;
236-
if (index > 0)
237-
{
238-
var node = nodes[index - 1];
239-
offset = node.Offset + node.MemorySize;
240-
}
241-
242235
while (size > 0)
243236
{
244237
var node = CreateDefaultNodeForSize(size);
@@ -248,13 +241,11 @@ protected void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
248241
}
249242

250243
node.ParentNode = this;
251-
node.Offset = offset;
252244

253245
nodes.Insert(index, node);
254246

255247
createdNodes?.Add(node);
256248

257-
offset += node.MemorySize;
258249
size -= node.MemorySize;
259250

260251
index++;

0 commit comments

Comments
 (0)