Build 1583 and the referenced array bug

 

Can't pass an array of scturcts as reference.

This bug was introduced in the build 1583:

int OnInit()
  {
   MqlParam params[4];

   Print("A ",ArraySize(params));

   Test(params);

   return(INIT_SUCCEEDED);
  }

void Test(MqlParam &params[])
  {
   Print("B ",ArraySize(params));
  }

void OnTick()
  {
  }

Result:

A 4
B 1

Replace MqlParam to MqlBookInfo and the reuslt is even weirder:

A 4
B 232317072

Change or a basic type (int, float, double, string...) and it works as supposed.

A 4
B 4

So... how to by pass this?

 

And this causes an Access Violation:

int OnInit()
  {
   MqlParam params[1];
   params[0].string_value="XXX";

   Test(params);

   return(INIT_SUCCEEDED);
  }

void Test(MqlParam &params[])
  {
   Print(params[0].string_value);
  }

void OnTick()
  {
  }

The error goes on, it's much bigger:


 
MT4/MT5 bugs have to be reported to ServiceDesk. Did it ?
 

Oi Vilela tudo bom?

Você chegou a receber algum feedback referente a este bug?

Estou recebendo ele também.