Skip to content
Snippets Groups Projects
Commit 9c3a122c authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix another Coverity defect

parent 6ceb2e3e
No related branches found
No related tags found
No related merge requests found
Pipeline #8794 passed
......@@ -706,7 +706,7 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, int mode,
length = (long)filelength(file);
l = length > (int)(cfg.level_linespermsg[useron_level] * MAX_LINE_LEN) - 1
? (cfg.level_linespermsg[useron_level] * MAX_LINE_LEN) - 1 : length;
if (read(file, buf, l) != l)
if (read(file, buf, l) != (ssize_t)l)
l = 0;
buf[l] = 0;
close(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment