summaryrefslogtreecommitdiff
path: root/src/gallery-utils.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-03-14 14:09:11 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-03-14 14:09:11 +0100
commit9514d8f844ada0b8a0b2450973374ee2ecd7b6b7 (patch)
tree045dd6cd66aa5609eb9524ac48803c4e5f5c7740 /src/gallery-utils.c
parentf37ddb3c6f7f903fd77935b7a7aefe11cbe00831 (diff)
downloadcataract-9514d8f844ada0b8a0b2450973374ee2ecd7b6b7.tar.xz
Support for common supportfiles root
Diffstat (limited to 'src/gallery-utils.c')
-rw-r--r--src/gallery-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallery-utils.c b/src/gallery-utils.c
index b7593fe..63744b9 100644
--- a/src/gallery-utils.c
+++ b/src/gallery-utils.c
@@ -151,11 +151,14 @@ copy_file (const char *src, const char *dst)
* - returns newly allocated string
*/
char *
-make_string (const char* substr, const int count)
+make_string (const char* substr, int count)
{
int i;
char *s;
+ if (count < 0)
+ count = 0;
+
s = malloc (strlen (substr) * count + 1);
for (i = 0; i < count; i++)
memcpy (s + (strlen (substr) * i), substr, strlen (substr));