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

dirnum is unsigned, so do not check for negative

CID 330990
parent bc4f24f5
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -1533,7 +1533,7 @@ js_filebase_constructor(JSContext *cx, uintN argc, jsval *arglist)
#endif
p->smb.dirnum = getdirnum(scfg, base);
if(p->smb.dirnum >= 0 && p->smb.dirnum < scfg->total_dirs) {
if(p->smb.dirnum < scfg->total_dirs) {
safe_snprintf(p->smb.file, sizeof(p->smb.file), "%s%s"
,scfg->dir[p->smb.dirnum]->data_dir, scfg->dir[p->smb.dirnum]->code);
} else { /* unknown code */
......
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