Empty message in announce script command (#4200)
Added a check to fail silently when the message in the *announce script commands is ""
This commit is contained in:
@@ -205,6 +205,10 @@ int intif_rename(struct map_session_data *sd, int type, char *name)
|
||||
*/
|
||||
int intif_broadcast(const char* mes, int len, int type)
|
||||
{
|
||||
nullpo_ret(mes);
|
||||
if (len < 2)
|
||||
return 0;
|
||||
|
||||
int lp = (type|BC_COLOR_MASK) ? 4 : 0;
|
||||
|
||||
// Send to the local players
|
||||
@@ -246,6 +250,10 @@ int intif_broadcast(const char* mes, int len, int type)
|
||||
*/
|
||||
int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY)
|
||||
{
|
||||
nullpo_ret(mes);
|
||||
if (len < 2)
|
||||
return 0;
|
||||
|
||||
// Send to the local players
|
||||
clif_broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user