Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4d420d

Browse filesBrowse files
committed
Fixed a crash where using the 'Insert Bytes' menu on the topmost class would throw an Exception
1 parent 378ad29 commit e4d420d
Copy full SHA for e4d420d

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎ReClass.NET/Nodes/BaseContainerNode.cs

Copy file name to clipboardExpand all lines: ReClass.NET/Nodes/BaseContainerNode.cs
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ public void AddBytes(int size)
243243

244244
public void InsertBytes(BaseNode position, int size)
245245
{
246+
int index = FindNodeIndex(position);
246247
List<BaseNode> dummy = null;
247-
InsertBytes(FindNodeIndex(position), size, ref dummy);
248+
InsertBytes(index >= 0 ? index : 0, size, ref dummy);
248249
}
249250

250251
/// <summary>Inserts <paramref name="size"/> bytes at the specified position.</summary>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.