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

Fix "Testable Files" file extension comparison

Issue introduced in v3.19: Testable Files (a.k.a. upload processors) with a specified file extension/type (e.g. "ZIP" and not "*") would never run because the file extension comparison logic was "off by one". Testable Files with an extension of "*" (all files/types) would still run however.

This fixes issue #331 reported by Nightfox.
parent a999e510
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2650 passed
......@@ -55,7 +55,7 @@ bool sbbs_t::uploadfile(file_t* f)
f->hdr.when_written.time = (uint32_t)fdate(path);
char* fext = getfext(f->name);
for(i=0;i<cfg.total_ftests;i++)
if(cfg.ftest[i]->ext[0]=='*' || (fext != NULL && stricmp(fext, cfg.ftest[i]->ext) == 0)) {
if(cfg.ftest[i]->ext[0]=='*' || (fext != NULL && stricmp(fext + 1, cfg.ftest[i]->ext) == 0)) {
if(!chk_ar(cfg.ftest[i]->ar,&useron,&client))
continue;
attr(LIGHTGRAY);
......
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