Skip to content

Commit

Permalink
from PR dlang#10547 fix a programming bug in ctfe foreach_rverse code
Browse files Browse the repository at this point in the history
Index is not decremented which causes bounds checking error.
  • Loading branch information
SSoulaimane committed Nov 7, 2019
1 parent ae44aa3 commit cc15991
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dmd/dinterpret.d
Original file line number Diff line number Diff line change
Expand Up @@ -7274,6 +7274,7 @@ private Expression foreachApplyUtf(UnionExp* pue, InterState* istate, Expression
char x = cast(char)r.isIntegerExp().getInteger();
if ((x & 0xC0) != 0x80)
break;
--indx;
++buflen;
}
}
Expand Down

0 comments on commit cc15991

Please sign in to comment.