fix coverity errors

This commit is contained in:
Enno Rehling 2019-02-15 10:07:55 +01:00
parent 07f7adbe56
commit de06600394
2 changed files with 5 additions and 2 deletions

View File

@ -1186,6 +1186,9 @@ int readgame(const char *filename)
binstore_done(&store);
fstream_done(&strm);
}
else {
fclose(F);
}
return n;
}

View File

@ -1443,7 +1443,7 @@ void pump_paragraph(sbstring *sbp, stream *out, size_t maxlen, bool isfinal)
++begin;
}
pos = begin;
while (pos) {
do {
char *next = strchr(pos+1, ' ');
if (next == NULL) {
if (isfinal) {
@ -1474,7 +1474,7 @@ void pump_paragraph(sbstring *sbp, stream *out, size_t maxlen, bool isfinal)
break;
}
pos = next;
}
} while (pos);
}
if (isfinal) {
char *pos = sbp->begin;