1
0
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:
batrick
2011-05-11 15:08:55 +00:00
parent e700497f6c
commit 4444071f03
17 changed files with 82 additions and 82 deletions

View File

@@ -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