Skip to content

Commit

Permalink
Merge pull request #12 from jakibaki/master
Browse files Browse the repository at this point in the history
Add newline in vmir_puts
  • Loading branch information
andoma authored Aug 29, 2018
2 parents 1b46a3b + 34554ff commit e81176b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vmir_libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,10 @@ static int
vmir_puts(void *ret, const void *rf, ir_unit_t *iu)
{
const char *str = vmir_vm_ptr(&rf, iu);
if(iu->iu_stdout != NULL)
if(iu->iu_stdout != NULL) {
fwrite(str, strlen(str), 1, iu->iu_stdout->fp);
fwrite("\n", 1, 1, iu->iu_stdout->fp);
}
vmir_vm_ret32(ret, 0);
return 0;
}
Expand Down

0 comments on commit e81176b

Please sign in to comment.