From e7ebc6c703cd31577bd78f7b133ba18c5dfab1a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 21 Mar 2016 02:51:37 +0300 Subject: Fix possible crash in skill cooldowns. --- src/localconsts.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/localconsts.h') diff --git a/src/localconsts.h b/src/localconsts.h index eee549789..6c52bf0e1 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -195,6 +195,9 @@ #define FOR_EACHP(type, iter, array) for (type iter = array->begin(), \ iter##_fend = array->end(); iter != iter##_fend; ++ iter) +#define FOR_EACH_SAFE(type, iter, array) for (type iter = array.begin(); \ + iter != array.end(); ++ iter) + #ifdef ENABLE_CHECKPLUGIN #define A_NONNULLPOINTER __attribute__((nonnullpointer)) #else -- cgit v1.2.3-70-g09d2