Mercurial > hg > Applications > TreeVNC
changeset 212:a106bbed1888
Merge with 2132018b8c681ebf380c92b3a45c1fa68b8a28f7
author | oc |
---|---|
date | Wed, 02 Jul 2014 20:35:28 +0900 |
parents | d7d367187d46 (current diff) 2132018b8c68 (diff) |
children | a8ae952191b8 |
files | |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVNCNetwork.java Wed Jul 02 20:34:44 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVNCNetwork.java Wed Jul 02 20:35:28 2014 +0900 @@ -49,9 +49,9 @@ byte[] netmask = ipaddress.getAddress().getAddress(); for(int i = 0; i < netmask.length; i++) { int bitpos = i * 8; - if (bitpos > prefix) { + if (bitpos+8 > prefix) { netmask[i] = 0; - } else if (bitpos+8 > prefix) { + } else if (bitpos > prefix) { // ex. bitpos = 0, prefix = 2 // bitpos+8-prefix // 1100 0000