Created
March 3, 2011 23:13
-
-
Save zaki50/853826 to your computer and use it in GitHub Desktop.
コマンドの長さが127を超えると例外がスローされるので修正
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/net/kazzz/felica/lib/FeliCaLib.java | |
=================================================================== | |
--- src/net/kazzz/felica/lib/FeliCaLib.java (リビジョン 37) | |
+++ src/net/kazzz/felica/lib/FeliCaLib.java (作業コピー) | |
@@ -256,7 +256,7 @@ | |
* @return byte[] このデータのバイト列表現を戻します | |
*/ | |
public byte[] getBytes() { | |
- ByteBuffer buff = ByteBuffer.allocate(this.length); | |
+ ByteBuffer buff = ByteBuffer.allocate(this.length & 0xFF); | |
if ( this.idm != null ) { | |
buff.put(this.length).put(this.commandCode).put(this.idm.getBytes()).put(this.data); | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment