X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fstreams%2FReplaceInputStream.java;h=9f733504117c314768603669b73cde0f7aa2ab40;hb=4a464a06db3158e31c64aa798ddce9df1ec7f5f5;hp=1cc5139beae1e012053f62dece957076add4dfee;hpb=136e0f9fd89bf7c72b60480c9bc9641f4bfb4faa;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/streams/ReplaceInputStream.java b/src/be/nikiroo/utils/streams/ReplaceInputStream.java index 1cc5139..9f73350 100644 --- a/src/be/nikiroo/utils/streams/ReplaceInputStream.java +++ b/src/be/nikiroo/utils/streams/ReplaceInputStream.java @@ -141,11 +141,11 @@ public class ReplaceInputStream extends BufferedInputStream { if (froms[i] != null && froms[i].length > 0 && StreamUtils.startsWith(froms[i], source, spos, slen)) { if (tos[i] != null && tos[i].length > 0) { - System.arraycopy(tos[i], 0, buffer, off + spos, + System.arraycopy(tos[i], 0, buffer, off + count, tos[i].length); count += tos[i].length; } - + spos += froms[i].length; replaced = true; break;