Skip to content

Commit

Permalink
Increment p *then* set last full attribute pointer. Fixes #550
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 17, 2014
1 parent 1bcccc8 commit 3f02bc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/modules/rlm_rest/rest.c
Expand Up @@ -518,18 +518,18 @@ static size_t rest_encode_post(void *ptr, size_t size, size_t nmemb, void *userd

if (!--s) goto no_space;


/*
* We wrote one full attribute value pair, record progress.
*/
f = p;

/*
* there are more attributes, insert a separator
*/
if (fr_cursor_next(&ctx->cursor)) {
*p++ = '&';
}

/*
* We wrote one full attribute value pair, record progress.
*/
f = p;

ctx->state = READ_STATE_ATTR_BEGIN;
}

Expand Down

0 comments on commit 3f02bc8

Please sign in to comment.