From f95f9840960a581991949fb1241d7560896a3d0c Mon Sep 17 00:00:00 2001 From: Sergei Marochkin Date: Fri, 27 Apr 2018 19:03:27 +0300 Subject: [PATCH] #7: Fix making strings with custom array sizes --- zmessage.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zmessage.inc b/zmessage.inc index a1ef773..f55198a 100644 --- a/zmessage.inc +++ b/zmessage.inc @@ -153,7 +153,7 @@ static stock Zmsg_MakeString(dest[], const size = sizeof(dest), const src[], // get pos spos = Zmsg_ShiftStartPos(src, epos, is_packed, length); - epos = spos + ZMSG_MAX_CHAT_LENGTH - postfix_length - (last_color != -1 ? 8 : 0); + epos = spos + size - postfix_length - (last_color != -1 ? 8 : 0); if (line != 0) { epos -= prefix_length;