Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-01-23 00:13:29 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-01-23 00:13:29 +0300
commita6328fb50012c128e41d23d2de81241aeab14de2 (patch)
tree0ba979385496ba4a4f4a78d12e7a2090638b0ff7 /IpsPatcher.cs
parent3275e49815491257f7425e8484d42c2752bb11b9 (diff)
IPS patcher can enlarge ROMs now
Diffstat (limited to 'IpsPatcher.cs')
-rw-r--r--IpsPatcher.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/IpsPatcher.cs b/IpsPatcher.cs
index c7ea3ae2..88da4df9 100644
--- a/IpsPatcher.cs
+++ b/IpsPatcher.cs
@@ -25,6 +25,8 @@ namespace com.clusterrr.hakchi_gui
{
while (length > 0)
{
+ if (address >= data.Length)
+ Array.Resize(ref data, data.Length*2);
data[address] = patch[pos];
address++;
pos++;
@@ -37,6 +39,8 @@ namespace com.clusterrr.hakchi_gui
var b = patch[pos + 2];
while (length > 0)
{
+ if (address >= data.Length)
+ Array.Resize(ref data, data.Length*2);
data[address] = b;
address++;
length--;