[vlma-devel] commit: Fix conversion error. (Adrien Grand )

git version control git at videolan.org
Sun Jun 29 16:42:01 CEST 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Jun 29 15:54:30 2008 +0200| [1cdec59887023eee11dc7b274a78a277f30852c3]

Fix conversion error.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=1cdec59887023eee11dc7b274a78a277f30852c3
---

 .../src/main/java/org/videolan/vlma/IpBank.java    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/IpBank.java b/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
index 47fb130..56ae194 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
@@ -115,7 +115,7 @@ public class IpBank {
         int result = 0;
         byte[] t = ip.getAddress();
         for (int i = 0; i < 4; i++) {
-            result += result * 256 + t[i];
+            result += (t[i] & 255) << (8 * (3 - i));
         }
         return result;
     }



More information about the vlma-devel mailing list