Skip to content
Snippets Groups Projects
Commit 2072ac73 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

A little more paranoia around passed dirnum (could be negative)

parent de3d590e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -323,7 +323,7 @@ bool sbbs_t::checkprotresult(prot_t* prot, int error, file_t* f)
getfilepath(&cfg, f, fpath);
if(!checkprotresult(prot, error, fpath)) {
if(f->dir<cfg.total_dirs)
if(f->dir >= 0 && f->dir<cfg.total_dirs)
SAFEPRINTF4(str,"attempted to download %s (%s) from %s %s"
,f->name,ultoac((ulong)f->size,tmp)
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
......
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