From a93558bbd813df2241f7d454b89db0986957cfb2 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 30 May 2009 06:59:53 +0000 Subject: * Avoid needless re-allocation of ByteBuffer. git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@245 df292f66-193f-0410-a5fc-6d59da041ff2 --- src/org/connectbot/service/TerminalBridge.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/connectbot/service/TerminalBridge.java b/src/org/connectbot/service/TerminalBridge.java index 98c75f1..e0d48a7 100644 --- a/src/org/connectbot/service/TerminalBridge.java +++ b/src/org/connectbot/service/TerminalBridge.java @@ -255,16 +255,16 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener, InteractiveCal } while (bb.position() < n) { - bb = ByteBuffer.wrap(b, curpos, cr.length()); + ByteBuffer replacebb = ByteBuffer.wrap(b, curpos, cr.length()); cb.clear(); - replacer.decode(bb, cb, true); + replacer.decode(replacebb, cb, true); ((vt320) buffer).putString(cb.array(), 0, cb.position()); curpos += cr.length(); - bb = ByteBuffer.wrap(b, curpos, n - curpos); + bb.position(curpos); cb.clear(); cr = cd.decode(bb, cb, true); -- cgit v1.2.3