diff options
Diffstat (limited to 'common/stringop.c')
-rw-r--r-- | common/stringop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/stringop.c b/common/stringop.c index 8af0d60f..709be684 100644 --- a/common/stringop.c +++ b/common/stringop.c | |||
@@ -258,6 +258,9 @@ int unescape_string(char *string) { | |||
258 | } | 258 | } |
259 | 259 | ||
260 | char *join_args(char **argv, int argc) { | 260 | char *join_args(char **argv, int argc) { |
261 | if (!sway_assert(argc > 0, "argc should be positive")) { | ||
262 | return NULL; | ||
263 | } | ||
261 | int len = 0, i; | 264 | int len = 0, i; |
262 | for (i = 0; i < argc; ++i) { | 265 | for (i = 0; i < argc; ++i) { |
263 | len += strlen(argv[i]) + 1; | 266 | len += strlen(argv[i]) + 1; |