mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
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:
@@ -465,7 +465,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||||||
* will return the number of bags of gold.
|
* will return the number of bags of gold.
|
||||||
* Addition inspired by Jamie Nelson */
|
* Addition inspired by Jamie Nelson */
|
||||||
else if (!str_cmp(var, "findmob")) {
|
else if (!str_cmp(var, "findmob")) {
|
||||||
if (!field || !*field || !subfield || !*subfield) {
|
if (!*field || !subfield || !*subfield) {
|
||||||
script_log("findmob.vnum(mvnum) - illegal syntax");
|
script_log("findmob.vnum(mvnum) - illegal syntax");
|
||||||
strcpy(str, "0");
|
strcpy(str, "0");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user