Skip to content

Commit

Permalink
fix bogus copy in Blast.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed May 4, 2011
1 parent 068ee33 commit 8aa206e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OpenRA.FileFormats/FileFormats/Blast.cs
Expand Up @@ -123,7 +123,12 @@ public static byte[] Decompress(byte[] src)

len -= copy;
next += (ushort)copy;
Array.Copy(outBuffer, source, outBuffer, dest, copy);

// copy with old-fashioned memcpy semantics
// in case of overlapping ranges. this is NOT
// the same as Array.Copy()
while( copy-- > 0 )
outBuffer[dest++] = outBuffer[source++];

// Flush window to outstream
if (next == MAXWIN)
Expand Down

0 comments on commit 8aa206e

Please sign in to comment.