Skip to content

Commit

Permalink
Fixes error "5041: Position outside the string".
Browse files Browse the repository at this point in the history
  • Loading branch information
nseam committed Oct 26, 2021
1 parent 7c361dc commit 7c57612
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SerializerConversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ class SerializerConversions {
for (unsigned short i = 0; i < StringLen(value); ++i) {
#ifndef __MQL4__
_char1 = StringGetCharacter(value, i);
_char2 = StringGetCharacter(value, i + 1);
_char2 = (i + 1 < StringLen(value)) ? StringGetCharacter(value, i + 1) : 0;
#else
_char1 = StringGetChar(value, i);
_char2 = StringGetChar(value, i + 1);
_char2 = (i + 1 < StringLen(value)) ? StringGetChar(value, i + 1) : 0;
#endif

if (_char1 == '\\') {
switch (_char2) {
case '"':
Expand Down

0 comments on commit 7c57612

Please sign in to comment.