From a2c610956c9feda86980e1f43b9166380b784c0e Mon Sep 17 00:00:00 2001 From: Ding Li Date: Sat, 27 May 2017 10:22:18 +0800 Subject: [PATCH] Fix #2 caused by a StringToCharArray bug in MQL --- Include/Zmq/Common.mqh | 1 + 1 file changed, 1 insertion(+) diff --git a/Include/Zmq/Common.mqh b/Include/Zmq/Common.mqh index 7b99724..7a46dd3 100644 --- a/Include/Zmq/Common.mqh +++ b/Include/Zmq/Common.mqh @@ -104,6 +104,7 @@ string StringFromUtf8(const uchar &utf8[]) //+------------------------------------------------------------------+ void StringToUtf8(const string str,uchar &utf8[],bool ending=true) { + if(!ending && str=="") return; int count=ending ? -1 : StringLen(str); StringToCharArray(str,utf8,0,count,CP_UTF8); }