MCPcopy
hub / github.com/ThatGuySam/doesitarm / ReadUint16LE

Function ReadUint16LE

helpers/macho/memory.js:328–337  ·  view source on GitHub ↗
(arr, off)

Source from the content-addressed store, hash-verified

326
327//Little Endian
328export function ReadUint16LE(arr, off) {
329
330 if(arr.length < 2 || off > arr.length) //sanity check
331 throw new Error('Cannot read OOB.');
332
333 return parseInt("0x" +
334 arr[off + 1].toString(16) +
335 arr[off].toString(16)
336 );
337}
338
339export function ReadUint32LE(arr, off) {
340 if(arr.length < 4 || off > arr.length) //sanity check

Callers 1

onloadendFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected