fix IP counting

This commit is contained in:
Yifan Gao 2017-01-24 02:28:08 +06:00
parent 6762000f19
commit 33b6e6a292

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
)