Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass correct pointer to var_handler #218

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Pass correct pointer to var_handler
In this case `ptr` is pointer to `$` char, and `p` is pointed to character after `${`

Closes #217
  • Loading branch information
andoriyu committed Apr 9, 2020
commit 5e2d6299457da6baf2d6215583d468fd5d73216b
2 changes: 1 addition & 1 deletion src/ucl_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ ucl_expand_single_variable (struct ucl_parser *parser, const char *ptr,
}
if (!found) {
if (strict && parser->var_handler != NULL) {
if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free,
if (parser->var_handler (p, remain, &dst, &dstlen, &need_free,
parser->var_data)) {
memcpy (d, dst, dstlen);
ret += dstlen;
Expand Down