mirror of
https://github.com/nmap/nmap.git
synced 2026-08-29 04:53:24 +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:
parent
44a006a7cf
commit
a76990b9ae
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue