From 602ddf3e42360491e184882145650e044145d458 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Wed, 17 Apr 2024 13:15:09 +0100 Subject: [PATCH] Fix foreach ref index See https://github.com/dlang/dmd/pull/16381. --- src/undead/xml.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/undead/xml.d b/src/undead/xml.d index bf65d73..c4eed06 100644 --- a/src/undead/xml.d +++ b/src/undead/xml.d @@ -437,7 +437,7 @@ string decode(string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure if (mode == DecodeMode.NONE) return s; string buffer; - foreach (ref i; 0 .. s.length) + for (size_t i = 0; i < s.length; i++) { char c = s[i]; if (c != '&')