mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 02:19:04 +00:00
use # length operator instead of string.len (canonicalize)
Used this perl command: $ # perl -pi -e 's/string\.len\((.*?)\)/#\1/g' *.lua Also fixed one instance where the above command didn't correctly translate the intended code (string.len(a .. b .. c)).
This commit is contained in:
@@ -47,7 +47,7 @@ end
|
||||
numbytes = function(num)
|
||||
local n = num
|
||||
return function(buf)
|
||||
if(string.len(buf) >=n) then
|
||||
if(#buf >=n) then
|
||||
return n, n
|
||||
end
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user