Skip to content

Commit

Permalink
Add missing call to pj_chomp, in order to remove inline comments (#720)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
busstoptaktik authored Dec 19, 2017
1 parent a885fbb commit a70e8a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pj_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a70e8a3

Please sign in to comment.