fix IP counting

This commit is contained in:
Yifan Gao 2017-01-24 02:28:08 +06:00
parent dda8231dd9
commit 2dabeb47b8

View File

@ -52,8 +52,8 @@ while read file; do
(
sum=0
while read n; do
s=$((32 - ${n}))
sum=$(($sum + 1<<$s))
((s=32-n))
((sum+=1<<s))
done
echo $sum
)