diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-06 17:34:49 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-06 17:34:49 +0200 |
commit | 34b449d2b06e9887995d216685f9e62f6da37303 (patch) | |
tree | af95d14e7751d1457e07ba534dee8ba36e545037 /src | |
parent | Fix get-gamma bugs (diff) | |
download | libcoopgamma-34b449d2b06e9887995d216685f9e62f6da37303.tar.gz libcoopgamma-34b449d2b06e9887995d216685f9e62f6da37303.tar.bz2 libcoopgamma-34b449d2b06e9887995d216685f9e62f6da37303.tar.xz |
Fix error recv bug
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/libcoopgamma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index 387e698..2ca0a32 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -1855,6 +1855,7 @@ static int check_error(libcoopgamma_context_t* restrict ctx, libcoopgamma_async_ bad = 1; continue; } + value += 7; } ctx->error.number = (uint64_t)atoll(value); sprintf(temp, "%" PRIu64, ctx->error.number); @@ -1872,7 +1873,7 @@ static int check_error(libcoopgamma_context_t* restrict ctx, libcoopgamma_async_ payload = next_payload(ctx, &n); if (payload != NULL) { - if (memchr(ctx, '\0', n) || (payload[n - 1] != '\n')) + if (memchr(payload, '\0', n) || (payload[n - 1] != '\n')) goto badmsg; ctx->error.description = malloc(n); if (ctx->error.description == NULL) |