1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Remove more bin.lua packings.

This commit is contained in:
dmiller
2018-09-22 05:19:24 +00:00
parent e9addd756f
commit ff6b5b65a8
4 changed files with 116 additions and 184 deletions

View File

@@ -920,7 +920,8 @@ MQTT.utf8_parse = function(buf, pos)
return false, ("Buffer at position %d has no space for a %d-byte UTF-8 string."):format(pos, str_length)
end
return string.unpack(">s2", buf, pos)
local value, pos = string.unpack(">s2", buf, pos)
return pos, value
end
--- Prefix the body of an MQTT packet with a fixed header.