summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre')
-rw-r--r--cleopatre/application/libmme/src/mme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cleopatre/application/libmme/src/mme.c b/cleopatre/application/libmme/src/mme.c
index f61f7f6915..b2c31fb69d 100644
--- a/cleopatre/application/libmme/src/mme.c
+++ b/cleopatre/application/libmme/src/mme.c
@@ -426,7 +426,7 @@ mme_error_t mme_send (mme_ctx_t *ctx, mme_send_type_t type, unsigned char *iface
/* calculate number of mme packets needed */
nbpkt = (ctx->tail - ctx->head) / ( PKTSIZE - sizeof(MME_t) );
- if ( (ctx->tail - ctx->head) % ( PKTSIZE - sizeof(MME_t) ) > 0 )
+ if ( nbpkt == 0 || (ctx->tail - ctx->head) % ( PKTSIZE - sizeof(MME_t) ) > 0 )
{
nbpkt++;
}