on master help sign in
Merge pull request #3820 from clayrat/patch-1

check for non-negative return values in idris_writeStr

commit29e271c8dd6af842817156cdb17e203e401b0899 authorNiklas Larsson <metaniklas@gmail.com> dateTue 16 May 2017, 19:38 (9 years ago) parent0d541dd4cf8fd7
1 file changed+1−1
rts/idris_stdfgn.c+1−1
rts/idris_stdfgn.c+1−1
@@ -61,7 +61,7 @@ int fileSize(void* h) {
6161
6262int idris_writeStr(void* h, char* str) {
6363 FILE* f = (FILE*)h;
64− if (fputs(str, f)) {
64+ if (fputs(str, f) >= 0) {
6565 return 0;
6666 } else {
6767 return -1;