Mercurial > hg > RemoteEditor > REPSessionManager
changeset 52:afddc6fe8d8d
UTF-8 Pack Method packUConv()/unpackUConv() add
author | fuchita |
---|---|
date | Tue, 13 Nov 2007 20:17:58 +0900 |
parents | e9fba549803e |
children | b87c9b39739a |
files | rep/REPPacketSend.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/REPPacketSend.java Tue Nov 13 19:57:21 2007 +0900 +++ b/rep/REPPacketSend.java Tue Nov 13 20:17:58 2007 +0900 @@ -57,9 +57,12 @@ e.printStackTrace(); } + //Encoded string length set int length = (buffer.position() -pos) -4; System.out.println("UTF-8: Set REPComand textlen(Byte) : " + (buffer.position() - pos-4)); - //Encoded string length set + if(length < 0) { + length = 0; + } buffer.putInt(pos, length); buffer.limit(24+length);