aboutsummaryrefslogtreecommitdiffstats
path: root/src/servers/coopgamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/servers/coopgamma.c')
-rw-r--r--src/servers/coopgamma.c4
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;