Fixes hexDump's bug
This commit is contained in:
parent
fa4be1ebc9
commit
d484c2ff6b
|
@ -40,7 +40,7 @@ proc dumpHex*(pbytes: pointer, nbytes: int, items = 1, ascii = true): string =
|
||||||
var k = 0
|
var k = 0
|
||||||
while k < items:
|
while k < items:
|
||||||
var ch = cast[ptr char](cast[uint](slider) + k.uint)[]
|
var ch = cast[ptr char](cast[uint](slider) + k.uint)[]
|
||||||
if ord(ch) > 31 and ord(ch) < 127: asciiText &= ch else: asciiText &= "."
|
if ascii or (ord(ch) > 31 and ord(ch) < 127): asciiText &= ch else: asciiText &= "."
|
||||||
inc(k)
|
inc(k)
|
||||||
case items:
|
case items:
|
||||||
of 1:
|
of 1:
|
||||||
|
|
Loading…
Reference in New Issue