From 34946572bf5b28126cbe00c255c06f0ef873fb7f Mon Sep 17 00:00:00 2001 From: vdemydiuk Date: Thu, 7 Jan 2016 01:30:25 +0200 Subject: [PATCH] Fixed bug in iCustom when parameters are null or empty --- MtApi/MtApiClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MtApi/MtApiClient.cs b/MtApi/MtApiClient.cs index 19084530..f87fcaab 100755 --- a/MtApi/MtApiClient.cs +++ b/MtApi/MtApiClient.cs @@ -855,7 +855,10 @@ namespace MtApi var commandParameters = new ArrayList { symbol, timeframe, name }; int arraySize = parameters != null ? parameters.Length : 0; commandParameters.Add(arraySize); - commandParameters.AddRange(parameters); + if (arraySize > 0) + { + commandParameters.AddRange(parameters); + } commandParameters.Add(mode); commandParameters.Add(shift);