mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
Fixed string explosion bug (should return 0 with empty string)
This commit is contained in:
@@ -464,7 +464,7 @@ explode_string (char *string, char *separators, int num_items_max,
|
||||
|
||||
n_items = num_items_max;
|
||||
|
||||
if (string == NULL)
|
||||
if (!string || !string[0])
|
||||
return NULL;
|
||||
|
||||
if (num_items_max == 0)
|
||||
|
||||
@@ -464,7 +464,7 @@ explode_string (char *string, char *separators, int num_items_max,
|
||||
|
||||
n_items = num_items_max;
|
||||
|
||||
if (string == NULL)
|
||||
if (!string || !string[0])
|
||||
return NULL;
|
||||
|
||||
if (num_items_max == 0)
|
||||
|
||||
Reference in New Issue
Block a user