mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
Potential fix for code scanning alert no. 4: Redundant null check due to previous dereference (#173)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -486,7 +486,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||||||
}
|
}
|
||||||
/* Addition inspired by Jamie Nelson. */
|
/* Addition inspired by Jamie Nelson. */
|
||||||
else if (!str_cmp(var, "findobj")) {
|
else if (!str_cmp(var, "findobj")) {
|
||||||
if (!field || !*field || !subfield || !*subfield) {
|
if (!*field || !subfield || !*subfield) {
|
||||||
script_log("findobj.vnum(ovnum) - illegal syntax");
|
script_log("findobj.vnum(ovnum) - illegal syntax");
|
||||||
strcpy(str, "0");
|
strcpy(str, "0");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user