Skip to content

Commit

Permalink
Fix SetPrintFormattingStatus for *stdout*
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed May 19, 2021
1 parent 73636ee commit 3796ef2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,9 +1857,13 @@ static Obj FuncSET_PRINT_FORMATTING_STDOUT(Obj self, Obj val)
TypOutputFile * output = IO()->Output;
if (!output)
ErrorMayQuit("SET_PRINT_FORMATTING_STDOUT called while no output is opened\n", 0, 0);
while (output->prev)
while (output->prev) {
// *stdout* is always file '1'
if (output->file == 1) {
output->format = (val != False);
}
output = output->prev;
output->format = (val != False);
}
return val;
}

Expand Down

0 comments on commit 3796ef2

Please sign in to comment.