Hi,
I think I've found a bug in CArrayString::Save, please see the attached script.
You'll notice that only the first string added in the array is saved, loaded and printed. However, after the modification below in MQL5\Include\Arrays\ArrayString.mqh (highlighted), the script works correctly:
Could you, please, verify?
Thanks in advance.
You are right, there is a bug. However your fix is also a bug, the FileWriteInteger() returns the number of bytes written, so depending of the file type (ANSI vs UNICODE), both the original code and your fix can be wrong.
Please report this issue to the ServiceDesk.
An other time, don't create topic on this section "Articles, Library comments...", rather use General or Experts Advisors section.
You are right, there is a bug. However your fix is also a bug, the FileWriteInteger() returns the number of bytes written, so depending of the file type (ANSI vs UNICODE), both the original code and your fix can be wrong.
Please report this issue to the ServiceDesk.
An other time, don't create topic on this section "Articles, Library comments...", rather use General or Experts Advisors section.
Thanks for your prompt response and suggestions on how to report bugs. I have just submitted this issue to Service Desk.
Regards,
Douglas
Hi everybody,
I submitted this very same bug through Service Desk on 2014.10.28, but I got no answer so far. Is there any other way to address this issue?
As a temporary solution, I fixed the problem in my local machine. The problem is that everytime the auto update runs, my fix in ArrayString.mqh is reverted.
Thanks in advance,
Douglas
Hi everybody,
I submitted this very same bug through Service Desk on 2014.10.28, but I got no answer so far. Is there any other way to address this issue?
As a temporary solution, I fixed the problem in my local machine. The problem is that everytime the auto update runs, my fix in ArrayString.mqh is reverted.
Thanks in advance,
Douglas
They have their own priorities.
To implement your fix you need to define your own class, not modify directly a file of the Standard Library.
#include <Arrays\ArrayString.mqh> //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CMyArrayString : public CArrayString { public: CMyArrayString(void) { }; ~CMyArrayString(void) { }; virtual bool CMyArrayString::Save(const int file_handle); }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ bool CMyArrayString::Save(const int file_handle) { //--- Add here your own fix }
And of course you have to use CMyArrayString instead of CArrayString in your script.
- www.mql5.com
They have their own priorities.
To implement your fix you need to define your own class, not modify directly a file of the Standard Library.
And of course you have to use CMyArrayString instead of CArrayString in your script.
Here is my fix (see the attached files).
The drawback is that I have to replace every occurrence of CArrayString with CArrayStringFix in my mqh and mq5 files. I believe this should not be the definite solution, but it works.
I hope the desktop guys solve this issue as soon as possible.
Thank you very much
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I think I've found a bug in CArrayString::Save, please see the attached script.
You'll notice that only the first string added in the array is saved, loaded and printed. However, after the modification below in MQL5\Include\Arrays\ArrayString.mqh (highlighted), the script works correctly:
Could you, please, verify?
Thanks in advance.