mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Fix off-by-one error in unicode.decode.
Would fail to decode the last character in a string.
This commit is contained in:
@@ -34,7 +34,7 @@ local unpack = bin.unpack
|
||||
function decode(buf, decoder, bigendian)
|
||||
local cp = {}
|
||||
local pos = 1
|
||||
while pos < #buf do
|
||||
while pos <= #buf do
|
||||
pos, cp[#cp+1] = decoder(buf, pos, bigendian)
|
||||
end
|
||||
return cp
|
||||
|
||||
Reference in New Issue
Block a user