mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-13 03:24:20 +01:00
Prevent compiler warnings and potential OLC setting string truncation.
- Prevented compiler warnings when using ’-Wtautological-pointer-compare’ on development system (Darwin) - Prevented possible string truncation when adding a newline to an OLC setting string.
This commit is contained in:
parent
5dc6eae4c5
commit
68fcdb73bf
9 changed files with 18 additions and 19 deletions
|
|
@ -169,8 +169,7 @@ void do_dg_affect(void *go, struct script_data *sc, trig_data *trig,
|
|||
half_chop(cmd, value_p, duration_p);
|
||||
|
||||
/* make sure all parameters are present */
|
||||
if (charname == NULL || !*charname || property == NULL || !*property ||
|
||||
value_p == NULL || !*value_p || duration_p == NULL || !*duration_p) {
|
||||
if (!*charname || !*property || !*value_p || !*duration_p) {
|
||||
script_log("Trigger: %s, VNum %d. dg_affect usage: <target> <property> <value> <duration>",
|
||||
GET_TRIG_NAME(trig), GET_TRIG_VNUM(trig));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue