diff options
-rw-r--r-- | support/export/client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/support/export/client.c b/support/export/client.c index ba2db8f..e749cac 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -482,8 +482,12 @@ add_name(char *old, const char *add) else cp = cp + strlen(cp); } - strncpy(new, old, cp-old); - new[cp-old] = 0; + if (old) { + strncpy(new, old, cp-old); + new[cp-old] = 0; + } else { + new[0] = 0; + } if (cp != old && !*cp) strcat(new, ","); strcat(new, add); |