diff options
author | Kenny Root <kenny@the-b.org> | 2009-05-30 06:59:53 +0000 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2009-05-30 06:59:53 +0000 |
commit | a93558bbd813df2241f7d454b89db0986957cfb2 (patch) | |
tree | c9bcc638559f2b7324a4ed6b53ed796291b34b20 | |
parent | ca342459c046211a394ec95b238b15e1fabfeeed (diff) | |
download | connectbot-a93558bbd813df2241f7d454b89db0986957cfb2.tar.gz connectbot-a93558bbd813df2241f7d454b89db0986957cfb2.tar.bz2 connectbot-a93558bbd813df2241f7d454b89db0986957cfb2.zip |
* Avoid needless re-allocation of ByteBuffer.
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@245 df292f66-193f-0410-a5fc-6d59da041ff2
-rw-r--r-- | src/org/connectbot/service/TerminalBridge.java | 6 |
1 files changed, 3 insertions, 3 deletions
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); |