From e6a944822e3dc5c79a6bab7723505cc809f2c76d Mon Sep 17 00:00:00 2001 From: Miepee Date: Mon, 23 Jan 2023 16:40:08 +0100 Subject: [PATCH] Fix potential crash when porting to mac --- AM2RPortHelperLib/RawMods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AM2RPortHelperLib/RawMods.cs b/AM2RPortHelperLib/RawMods.cs index c5bcca6..a0e6287 100644 --- a/AM2RPortHelperLib/RawMods.cs +++ b/AM2RPortHelperLib/RawMods.cs @@ -655,7 +655,7 @@ public abstract class RawMods : ModsBase } ScriptMessage("Trying to remove functions \"immersion_play_effect\", \"immersion_stop\" and \"font_replace\"!"); - foreach (UndertaleFunction func in Data.Functions) + foreach (UndertaleFunction func in Data.Functions.ToList()) { if (func.ToString() == "immersion_play_effect" || func.ToString() == "immersion_stop" || func.ToString() == "font_replace") Data.Functions.Remove(func);