Skip to content

Commit

Permalink
Save the parsed array reference
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 16, 2013
1 parent d8c42ae commit bf6e5b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/xlat.c
Expand Up @@ -776,7 +776,7 @@ static ssize_t xlat_tokenize_expansion(TALLOC_CTX *ctx, char *fmt, xlat_exp_t **
} else {
q = strchr(attrname, '[');
}
if (q) *q = '\0';
if (q) *(q++) = '\0';

if (!*attrname) {
talloc_free(node);
Expand Down Expand Up @@ -838,13 +838,13 @@ static ssize_t xlat_tokenize_expansion(TALLOC_CTX *ctx, char *fmt, xlat_exp_t **
unsigned long num;
char *end;

p = q + 1;
p = q;
if (*p== '#') {
num = 65536;
node->num = 65536;
p++;

} else if (*p == '*') {
num = 65537;
node->num = 65537;
p++;

} else if (isdigit((int) *p)) {
Expand All @@ -856,6 +856,7 @@ static ssize_t xlat_tokenize_expansion(TALLOC_CTX *ctx, char *fmt, xlat_exp_t **
}
p = end;
DEBUG("END %s", p);
node->num = num;

} else {
talloc_free(node);
Expand Down

0 comments on commit bf6e5b1

Please sign in to comment.