(svn r2342) - Fix (Regression): _cmd_text is always valid, so test the first character for '\0'. Also for some reason I forgot to validate the p1 param so that might lead to crashes with invalid signes. Fixed as well.
This commit is contained in:
5
signs.h
5
signs.h
@@ -41,6 +41,11 @@ static inline uint16 GetSignPoolSize(void)
|
||||
return _sign_pool.total_items;
|
||||
}
|
||||
|
||||
static inline bool IsSignIndex(uint index)
|
||||
{
|
||||
return index < GetSignPoolSize();
|
||||
}
|
||||
|
||||
#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1 < GetSignPoolSize()) ? GetSign(ss->index + 1) : NULL)
|
||||
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user