mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-28 02:57:56 +00:00
Changed wcslen to wcsnlen [MT5]
Maximum character length set to 1000 based on preinit() MQL5 function. This value must be kept synchronized with MQL side.
This commit is contained in:
@@ -52,8 +52,8 @@ public struct CMqlBookInfo
|
||||
void convertSystemString(wchar_t* dest, String^ src)
|
||||
{
|
||||
pin_ptr<const wchar_t> wch = PtrToStringChars(src);
|
||||
memcpy(dest, wch, wcslen(wch) * sizeof(wchar_t));
|
||||
dest[wcslen(wch)] = L'\0';
|
||||
memcpy(dest, wch, wcsnlen(wch, 1000) * sizeof(wchar_t));
|
||||
dest[wcsnlen(wch, 1000)] = L'\0';
|
||||
}
|
||||
|
||||
#define _DLLAPI extern "C" __declspec(dllexport)
|
||||
|
||||
Reference in New Issue
Block a user