mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bug Fix] Add Validation to #find, #set, and #show args (#3598)
# Notes - We were not validating `sep->arg[i]` so we could possibly be pushing a `nullptr` in.
This commit is contained in:
parent
df1d740ae6
commit
26e72c6857
@ -72,7 +72,9 @@ void command_find(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
// skip the first arg
|
// skip the first arg
|
||||||
for (auto i = 1; i <= arguments; i++) {
|
for (auto i = 1; i <= arguments; i++) {
|
||||||
args.emplace_back(sep->arg[i]);
|
if (sep->arg[i]) {
|
||||||
|
args.emplace_back(sep->arg[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// build the rewrite string
|
// build the rewrite string
|
||||||
|
|||||||
@ -136,7 +136,9 @@ void command_set(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
// skip the first arg
|
// skip the first arg
|
||||||
for (auto i = 1; i <= arguments; i++) {
|
for (auto i = 1; i <= arguments; i++) {
|
||||||
args.emplace_back(sep->arg[i]);
|
if (sep->arg[i]) {
|
||||||
|
args.emplace_back(sep->arg[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// build the rewrite string
|
// build the rewrite string
|
||||||
|
|||||||
@ -115,7 +115,9 @@ void command_show(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
// skip the first arg
|
// skip the first arg
|
||||||
for (auto i = 1; i <= arguments; i++) {
|
for (auto i = 1; i <= arguments; i++) {
|
||||||
args.emplace_back(sep->arg[i]);
|
if (sep->arg[i]) {
|
||||||
|
args.emplace_back(sep->arg[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// build the rewrite string
|
// build the rewrite string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user