From 48178ec7f8d5969713981071fda803f534d3d886 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Wed, 27 Aug 2014 15:38:26 +0200 Subject: [PATCH] Fix PTYOutputStream.write for off > 0 --- .../src/org/eclipse/cdt/utils/pty/PTYOutputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java index f6096e5a443..8255597c43a 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 QNX Software Systems and others. + * Copyright (c) 2000, 2014 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,7 +46,7 @@ public class PTYOutputStream extends OutputStream { return; } byte[] tmpBuf = new byte[len]; - System.arraycopy(b, off, tmpBuf, off, len); + System.arraycopy(b, off, tmpBuf, 0, len); write0(master.getFD(), tmpBuf, len); } /**