Potential fix for code scanning alert no. 3: Redundant null check due to previous dereference (#172)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Thomas Arp
2026-04-21 23:10:46 +02:00
committed by GitHub
parent 039e45c5ef
commit 1dfbe0fa83

View File

@@ -465,7 +465,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
* will return the number of bags of gold.
* Addition inspired by Jamie Nelson */
else if (!str_cmp(var, "findmob")) {
if (!field || !*field || !subfield || !*subfield) {
if (!*field || !subfield || !*subfield) {
script_log("findmob.vnum(mvnum) - illegal syntax");
strcpy(str, "0");
} else {