Skip to content

Commit c237fab

Browse files
committed
Fixed undeclared variable
1 parent 9177964 commit c237fab

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package = "ip2location"
2-
version = "8.6.0-1"
2+
version = "8.6.1-1"
33
source = {
44
url = "git://github.com/ip2location/ip2location-lua.git"
55
}

ip2location.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ local usagetype_position = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
122122
local addresstype_position = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21}
123123
local category_position = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22}
124124

125-
local api_version = "8.6.0"
125+
local api_version = "8.6.1"
126126

127127
local modes = {
128128
countryshort = 0x000001,
@@ -654,8 +654,8 @@ function ip2location:query(ipaddress, mode)
654654
end
655655

656656
if (ipno >= ipfrom) and (ipno < ipto) then
657-
rowlen = colsize - firstcol
658-
row = string.sub(fullrow, firstcol + 1, (firstcol + rowlen + 1)) -- extract the actual row data
657+
readlen = colsize - firstcol
658+
row = string.sub(fullrow, firstcol + 1, (firstcol + readlen + 1)) -- extract the actual row data
659659

660660
if (mode&modes.countryshort == 1) and (self.country_enabled == true) then
661661
result.country_short = readstr(readuint32row(self.country_position_offset, row):asnumber(), self.f)

0 commit comments

Comments
 (0)