From a70e8a3579064e80f65b1ae118ae90588142886f Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 19 Dec 2017 12:58:14 +0100 Subject: Add missing call to pj_chomp, in order to remove inline comments (#720) Previously, when expanding init=foo.bar calls, pj_chomp was first called after collecting all lines, effectively discarding everything after the start of the first comment --- src/pj_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/pj_init.c b/src/pj_init.c index 1b0f479f..310206f7 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -189,6 +189,7 @@ static char *get_init_string (PJ_CONTEXT *ctx, char *name) { /* Otherwise, handle the line. It MAY be the start of the next section, */ /* but that will be handled at the start of next trip through the loop */ buffer_length = strlen (buffer); + pj_chomp (line); /* Remove '#' style comments */ next_length = strlen (line) + buffer_length + 2; if (next_length > current_buffer_size) { char *b = pj_malloc (2 * current_buffer_size); -- cgit v1.2.3