diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-17 21:56:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-17 21:56:31 +0200 |
commit | 300f5731a568d23c09be9bd6e352e2883a3f4573 (patch) | |
tree | 52dfb084e2320dfcf554b9c05c1a14151c21b022 | |
parent | fix deps (diff) | |
download | coopgammad-1.1.tar.gz coopgammad-1.1.tar.bz2 coopgammad-1.1.tar.xz |
Fix bug1.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/servers/coopgamma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/servers/coopgamma.c b/src/servers/coopgamma.c index b96df10..6e544be 100644 --- a/src/servers/coopgamma.c +++ b/src/servers/coopgamma.c @@ -342,8 +342,8 @@ int handle_get_gamma(size_t conn, const char* restrict message_id, const char* r if (coal) { - if (start == 0) - memcpy(buf + n, output->table_sums[end].u8.red, output->ramps_size); + if ((start == 0) && (start < end)) + memcpy(buf + n, output->table_sums[end - 1].u8.red, output->ramps_size); else { union gamma_ramps ramps; |