diff options
Diffstat (limited to 'src/common/msg_utils.c')
-rw-r--r-- | src/common/msg_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 09596f36..f00a71ac 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -112,7 +112,8 @@ void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); + copy_len = OSMO_MIN(length + 1, + ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; lchan->tch.dtx.fn = fn; |