aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-15 00:33:49 +0000
committerJason Woodward2005-01-15 00:33:49 +0000
commit0a0f56512f654940c9218c3b51fcdef396c05839 (patch)
treec95f08f983f9d97b8c14554624a1221ea6b8d1d8 /src
parenta326edbe94bedcfa25c084d95dd3cd4735e01a75 (diff)
downloadslapt-get-0a0f56512f654940c9218c3b51fcdef396c05839.tar.gz
fixed exclude parsing regression, adding any trailing commas
Diffstat (limited to 'src')
-rw-r--r--src/configuration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/configuration.c b/src/configuration.c
index e51ff4d..695dcf2 100644
--- a/src/configuration.c
+++ b/src/configuration.c
@@ -193,7 +193,7 @@ static struct exclude_list *parse_exclude(char *line){
if( realloc_tmp != NULL ){
list->excludes = realloc_tmp;
list->excludes[ list->count ] = strndup(
- pointer, strlen(pointer) + 1
+ pointer, strlen(pointer)
);
list->excludes[ list->count ][strlen(pointer)] = '\0';
++list->count;
@@ -210,7 +210,7 @@ static struct exclude_list *parse_exclude(char *line){
pointer = strchr(line + position,',');
buffer = strndup(
line + position,
- strlen(line + position) - strlen(pointer) + 1
+ strlen(line + position) - strlen(pointer)
);
realloc_tmp = realloc( list->excludes, sizeof *list->excludes * (list->count + 1) );