Module:IP: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
fix variable name in RawIP:getAdjacent
(fix IPAddress concatenation)
(fix variable name in RawIP:getAdjacent)
Line 143:
local result = Collection()
result.n = self.n
local carry = downprevious and 0xffff or 1
for i = self.n, 1, -1 do
local sum = self[i] + carry
if sum >= 0x10000 then
carry = downprevious and 0x10000 or 1
sum = sum - 0x10000
else
carry = downprevious and 0xffff or 0
end
result[i] = sum
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu