Mercurial > hg > Applications > TreeVNC
changeset 464:a817fa255673
fix onTheSame Network
author | kono |
---|---|
date | Tue, 12 Jul 2016 18:52:27 +0900 |
parents | 5bef0f09f088 |
children | 2107b954e285 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java Wed Jul 06 18:12:33 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java Tue Jul 12 18:52:27 2016 +0900 @@ -274,9 +274,11 @@ byte [] netmask = n.netmask; byte [] netaddress = n.address; if (byteadr.length != netmask.length) continue; - for (int i = 0; i < netmask.length; i++) { - if ((netmask[i] & byteadr[i]) != netaddress[i]) continue; + int i; + for (i = 0; i < netmask.length; i++) { + if ((netmask[i] & byteadr[i]) != netaddress[i]) break; } + if (i < netmask.length) continue; return true; } return false;