Skip to content

Commit a74c37a

Browse files
[[ Bug 13658 ]] Reading from a process until EOF should not stop at the first 0x4 byte read
1 parent 70d5935 commit a74c37a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

engine/src/cmdsf.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,7 +3280,13 @@ Exec_stat MCRead::exec(MCExecPoint &ep)
32803280
if (arg == OA_FILE)
32813281
t_is_text = MCfiles[index] . textmode != 0;
32823282
else if (arg == OA_PROCESS)
3283+
{
32833284
t_is_text = MCprocesses[index] . textmode != 0;
3285+
// SN-2014-10-14: [[ Bug 13658 ]] Ensure that we read all we can from the process, not
3286+
// until 0x4 (which might be read before the end, when outputting binary data)
3287+
if (*sptr == 0x4)
3288+
ep.setsvalue("");
3289+
}
32843290
else
32853291
t_is_text = true;
32863292
if (!t_is_text)

0 commit comments

Comments
 (0)