summaryrefslogtreecommitdiff
path: root/app/bin/shortentext.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/bin/shortentext.c')
-rw-r--r--app/bin/shortentext.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/bin/shortentext.c b/app/bin/shortentext.c
index 6cd16e6..b1b2202 100644
--- a/app/bin/shortentext.c
+++ b/app/bin/shortentext.c
@@ -71,7 +71,9 @@ EllipsizeString(char *source, char *dest, size_t length)
return;
}
- strncpy(resultString, source, length);
+ if ( dest )
+ strncpy(resultString, source, length);
+
resultString[ length ] = '\0';
position = length - 1;
@@ -89,4 +91,5 @@ EllipsizeString(char *source, char *dest, size_t length)
strcpy(resultString + (strlen(resultString) - sizeof(ELLIPSIZE) + 1), ELLIPSIZE);
}
return;
-} \ No newline at end of file
+}
+