aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-12-19 12:58:14 +0100
committerGitHub <noreply@github.com>2017-12-19 12:58:14 +0100
commita70e8a3579064e80f65b1ae118ae90588142886f (patch)
tree80d5da23a2c6d6478baf4d06b3f17115f87381fa /src
parenta885fbb2f1f285c2cdadacdaa4616bf60184f925 (diff)
downloadPROJ-a70e8a3579064e80f65b1ae118ae90588142886f.tar.gz
PROJ-a70e8a3579064e80f65b1ae118ae90588142886f.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/pj_init.c1
1 files changed, 1 insertions, 0 deletions
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);