changeset 380:537a9c6c6d9c

*** empty log message ***
author kono
date Thu, 23 Oct 2008 10:19:04 +0900
parents fa8ca18f74d2
children 65fdb3dc1885
files rep/REPCommandPacker.java rep/translator/TranslatorImpl.java
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rep/REPCommandPacker.java	Wed Oct 22 18:27:13 2008 +0900
+++ b/rep/REPCommandPacker.java	Thu Oct 23 10:19:04 2008 +0900
@@ -41,7 +41,9 @@
 	 * @see rep.REPPack#packUConv(rep.REPCommand)
 	 */
 	public ByteBuffer packUConv(REPCommand command){
-    	ByteBuffer buffer = ByteBuffer.allocateDirect(HEADER_SIZE+(command.string.length()*CHARSIZE));
+		int size = 0;
+		if (command.string!=null) size = command.string.length()*CHARSIZE;
+    	ByteBuffer buffer = ByteBuffer.allocateDirect(HEADER_SIZE+size);
     	buffer.clear();  // position = 0 
     	buffer.putInt(command.cmd.id);
     	buffer.putInt(command.sid);
--- a/rep/translator/TranslatorImpl.java	Wed Oct 22 18:27:13 2008 +0900
+++ b/rep/translator/TranslatorImpl.java	Thu Oct 23 10:19:04 2008 +0900
@@ -94,6 +94,7 @@
 			sentMergedList.add(m);
 			editor.send(m);
 		}				
+		merge_mode = true;
 		return true;
 	}