From 9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 27 Dec 2016 20:46:06 -0800 Subject: Message allocation fixed. Comparison was backwards. --- src/core/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/message.c b/src/core/message.c index 6976f4da..b07d107f 100644 --- a/src/core/message.c +++ b/src/core/message.c @@ -90,7 +90,7 @@ nni_chunk_grow(nni_chunk *ch, size_t newsz, size_t headwanted) // We either don't have a data pointer yet, or it doesn't reference // the backing store. In this case, we just check against the // allocated capacity and grow, or don't grow. - if (newsz > ch->ch_cap) { + if (newsz < ch->ch_cap) { // Enough space at end, so just use it. if (ch->ch_ptr == NULL) { ch->ch_ptr = ch->ch_buf + headwanted; -- cgit v1.2.3-70-g09d2