r4913 bugfix: fillIPv4SpareList
authorAlexey Andriyanov <alan@al-an.info>
Tue, 17 Jan 2012 10:40:50 +0000 (10:40 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Tue, 17 Jan 2012 10:40:50 +0000 (10:40 +0000)
wwwroot/inc/functions.php

index 08a56264a672f9e413a8d87d5c89031ebe4cc75e..74d13c9f43efcbe0b1bd56cad242e8fda0f90854 100644 (file)
@@ -4947,9 +4947,9 @@ function fillIPv4SpareList (&$net, $a, $b)
                
                while ($a + (1 << $i) > $b)
                        $i--;
-               $a += (1 << $i);
                $mask = 32 - $i;
                $net['spare_ranges'][$mask][] = $a;
+               $a += (1 << $i);
        }
 }