[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3391 - GNUnet/src/util/config_impl
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3391 - GNUnet/src/util/config_impl |
Date: |
Sun, 10 Sep 2006 21:10:44 -0700 (PDT) |
Author: grothoff
Date: 2006-09-10 21:10:42 -0700 (Sun, 10 Sep 2006)
New Revision: 3391
Modified:
GNUnet/src/util/config_impl/impl.c
Log:
fix
Modified: GNUnet/src/util/config_impl/impl.c
===================================================================
--- GNUnet/src/util/config_impl/impl.c 2006-09-11 03:38:18 UTC (rev 3390)
+++ GNUnet/src/util/config_impl/impl.c 2006-09-11 04:10:42 UTC (rev 3391)
@@ -645,6 +645,7 @@
int i;
char * prefix;
char * result;
+ const char * post;
if (orig[0] != '$')
return orig;
@@ -653,7 +654,12 @@
(orig[i] != '\\') &&
(orig[i] != '\0') )
i++;
- orig[i] = '\0';
+ if (orig[i] == '\0') {
+ post = "";
+ } else {
+ orig[i] = '\0';
+ post = &orig[i+1];
+ }
prefix = NULL;
if (0 != _get_configuration_value_string(cfg,
section,
@@ -678,10 +684,10 @@
}
}
result = MALLOC(strlen(prefix) +
- strlen(&orig[i+1]) + 2);
+ strlen(post) + 2);
strcpy(result, prefix);
strcat(result, DIR_SEPARATOR_STR);
- strcat(result, &orig[i+1]);
+ strcat(result, post);
FREE(prefix);
FREE(orig);
return result;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3391 - GNUnet/src/util/config_impl,
grothoff <=