Skip to content

Commit 51e7299

Browse files
joakimforsmegastep
authored andcommitted
fix: only skip offset
The dd option skip seeks the input stream. An additional count reads the specified bytes from the input and outputs it. This causes the last bytes read to be incorrect.
1 parent a20c7bd commit 51e7299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

makeself-header.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ MS_dd_Progress()
130130
blocks=\`expr \$length / \$bsize\`
131131
bytes=\`expr \$length % \$bsize\`
132132
(
133-
dd ibs=\$offset skip=1 count=1 2>/dev/null
133+
dd ibs=\$offset skip=1 count=0 2>/dev/null
134134
pos=\`expr \$pos \+ \$bsize\`
135135
MS_Printf " 0%% " 1>&2
136136
if test \$blocks -gt 0; then

0 commit comments

Comments
 (0)