Skip to content
Snippets Groups Projects
Commit e73b42a3 authored by rswindell's avatar rswindell
Browse files

Fix off-by-one in digits of offset calculation.

parent bd8ec302
Branches
Tags
No related merge requests found
...@@ -31,7 +31,7 @@ function generate(title, val, include_ascii, include_offset) ...@@ -31,7 +31,7 @@ function generate(title, val, include_ascii, include_offset)
output.push(format("%s: %u bytes", title, length)); output.push(format("%s: %u bytes", title, length));
var line = ''; var line = '';
var ascii = ''; var ascii = '';
var digits = num_digits(length); var digits = num_digits(length - 1);
if(include_offset) if(include_offset)
line = format("%0*x: ", digits, 0); line = format("%0*x: ", digits, 0);
for(i=0; i < length; i++) { for(i=0; i < length; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment