Skip to content

Commit

Permalink
Debugger: Memory Viewer - Fixed crash when searching for strings/inte…
Browse files Browse the repository at this point in the history
…gers
  • Loading branch information
SourMesen committed Jan 27, 2024
1 parent aa49a65 commit 0aa3e4b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions UI/Debugger/ViewModels/MemoryViewerFindViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,12 @@ public class SearchData

public SearchData(byte[] data, byte[]? dataAlt = null)
{
Data = data.Cast<short>().ToArray();
DataAlt = dataAlt?.Cast<short>().ToArray();
Data = new short[data.Length];
Array.Copy(data, 0, Data, 0, data.Length);
if(dataAlt != null) {
DataAlt = new short[dataAlt.Length];
Array.Copy(dataAlt, 0, DataAlt, 0, dataAlt.Length);
}
}

public SearchData(short[] data)
Expand Down

0 comments on commit 0aa3e4b

Please sign in to comment.