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:
WyldTBA 2015-04-23 08:49:48 -04:00
parent 5dc6eae4c5
commit 68fcdb73bf
9 changed files with 18 additions and 19 deletions

View file

@ -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;