summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index ff180210..d0f87462 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -909,6 +909,9 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const
if(strlen(line) == 0 || line[0] == '#') {
continue;
}
+ if((ptr = strchr(line, '#'))) {
+ *ptr = '\0';
+ }
if(line[0] == '[' && line[strlen(line)-1] == ']') {
/* new config section */
ptr = line;