extern/concat.h: don't segfault if count == 0
raiz raiz@firemail.cc
Tue, 27 Dec 2016 20:18:33 +0300
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
extern/concat.h
→
extern/concat.h
@@ -11,6 +11,9 @@ va_list ap;
unsigned short int i; concat[0] = '\0'; + if (count == 0) + return; + va_start(ap, count); for(i = 0; i < count; i++) strlcat(concat, va_arg(ap, char *), sizeof(concat));