You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by je...@apache.org on 2015/03/22 22:46:17 UTC

mina git commit: Fix for DIRMINA-1008: fix broken algorithm

Repository: mina
Updated Branches:
  refs/heads/trunk e422ec88d -> eddbca617


Fix for DIRMINA-1008: fix broken algorithm


Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/eddbca61
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/eddbca61
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/eddbca61

Branch: refs/heads/trunk
Commit: eddbca6175befbfc2fc3af173a032f8bbd388d87
Parents: e422ec8
Author: Jeff MAURY <je...@apache.org>
Authored: Sun Mar 22 22:46:03 2015 +0100
Committer: Jeff MAURY <je...@apache.org>
Committed: Sun Mar 22 22:46:03 2015 +0100

----------------------------------------------------------------------
 core/src/main/java/org/apache/mina/util/ByteBufferDumper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/eddbca61/core/src/main/java/org/apache/mina/util/ByteBufferDumper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/mina/util/ByteBufferDumper.java b/core/src/main/java/org/apache/mina/util/ByteBufferDumper.java
index 25f79e7..b56e013 100644
--- a/core/src/main/java/org/apache/mina/util/ByteBufferDumper.java
+++ b/core/src/main/java/org/apache/mina/util/ByteBufferDumper.java
@@ -143,7 +143,7 @@ public class ByteBufferDumper {
         ByteBuffer res = ByteBuffer.allocate(size);
 
         for (int i = 0; i < size; i++) {
-            int b = Integer.parseInt(hex.substring(i, i + 2), 16);
+            int b = Integer.parseInt(hex.substring(i*2, i*2 + 2), 16);
             if (Integer.highestOneBit(b) == 128) {
               b = b - 256;
             }