Skip to content

Commit

Permalink
Fixed undeclared variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ip2whois committed Jul 26, 2022
1 parent 9177964 commit c237fab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package = "ip2location"
version = "8.6.0-1"
version = "8.6.1-1"
source = {
url = "git://github.com/ip2location/ip2location-lua.git"
}
Expand Down
6 changes: 3 additions & 3 deletions ip2location.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
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}
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}

local api_version = "8.6.0"
local api_version = "8.6.1"

local modes = {
countryshort = 0x000001,
Expand Down Expand Up @@ -654,8 +654,8 @@ function ip2location:query(ipaddress, mode)
end

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

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

0 comments on commit c237fab

Please sign in to comment.