mirror of
https://github.com/nmap/nmap.git
synced 2026-09-04 01:14:37 +00:00
More string.sub vs. string.byte optimizations
This commit is contained in:
parent
57a17415b7
commit
19693c334c
3 changed files with 4 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue