1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-23 14:49:02 +00:00

More string.sub vs. string.byte optimizations

This commit is contained in:
nnposter
2018-08-19 01:49:08 +00:00
parent 57a17415b7
commit 19693c334c
3 changed files with 4 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ local function screen_diff( orig_screen, current_screen )
if #orig_screen == 0 or #current_screen == 0 then return 0 end
local m = 1
for i =1 , #orig_screen do
if orig_screen:sub(i,i) == current_screen:sub(i,i) then
if orig_screen:byte(i) == current_screen:byte(i) then
m = m + 1
end
end