Commit 099c5fa5 authored by Rob Swindell's avatar Rob Swindell 💬
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
Pipeline #2650 passed with stage
in 9 minutes and 48 seconds
......@@ -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);
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)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment