1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 17:39:03 +00:00

Remove nearly all bit.lua use

This commit is contained in:
dmiller
2018-08-28 15:56:45 +00:00
parent e0af0179eb
commit 24c5ff63b2
21 changed files with 79 additions and 98 deletions

View File

@@ -31,7 +31,6 @@ local stdnse = require 'stdnse'
local httpspider = require 'httpspider'
local string = require 'string'
local bin = require 'bin'
local bit = require 'bit'
local table = require 'table'
-- These definitions are copied/pasted/reformatted from the jhead-2.96 sourcecode
@@ -369,10 +368,10 @@ local function process_gps(data, pos, endian, result)
end
elseif(tag == GPS_TAG_LATITUDEREF) then
-- Get the first byte in the latitude reference as a character
latitude_ref = string.char(bit.rshift(value, 24))
latitude_ref = string.char(value >> 24)
elseif(tag == GPS_TAG_LONGITUDEREF) then
-- Get the first byte in the longitude reference as a character
longitude_ref = string.char(bit.rshift(value, 24))
longitude_ref = string.char(value >> 24)
end
end