diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-01-23 00:13:29 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-01-23 00:13:29 +0300 |
commit | a6328fb50012c128e41d23d2de81241aeab14de2 (patch) | |
tree | 0ba979385496ba4a4f4a78d12e7a2090638b0ff7 /IpsPatcher.cs | |
parent | 3275e49815491257f7425e8484d42c2752bb11b9 (diff) |
IPS patcher can enlarge ROMs now
Diffstat (limited to 'IpsPatcher.cs')
-rw-r--r-- | IpsPatcher.cs | 4 |
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--;
|