Skip to content

Commit 7740a85

Browse files
ntreldlang-bot
authored andcommitted
[std/net/isemail] Fix foreach ref index
See dlang/dmd#16381.
1 parent 80235ea commit 7740a85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

std/net/isemail.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ if (isSomeChar!(Char))
111111
auto endOrDie = false;
112112
auto crlfCount = int.min; // int.min == not defined
113113

114-
foreach (ref i, e ; email)
114+
for (size_t i; i < email.length; i++)
115115
{
116+
auto e = email[i];
116117
token = email.get(i, e);
117118

118119
switch (context)

0 commit comments

Comments
 (0)