From 7cb80cf9f262143a9dd42726d75f7d515da46ee5 Mon Sep 17 00:00:00 2001
From: ZZYZX <zzyzx@virtual>
Date: Tue, 14 Feb 2017 17:48:31 +0200
Subject: [PATCH] Fixed: 'Save into' would detect non-map lumps with the same
 name as maps and ask if you want to save over...

---
 Source/Core/General/MapManager.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs
index 39781a34..a3b4cac8 100644
--- a/Source/Core/General/MapManager.cs
+++ b/Source/Core/General/MapManager.cs
@@ -905,7 +905,7 @@ namespace CodeImp.DoomBuilder
 					if(purpose == SavePurpose.IntoFile) 
 					{
 						WAD wad = new WAD(newfilepathname, true);
-						int mapindex = wad.FindLumpIndex(origmapname);
+                        int mapindex = FindAndRemoveMap(wad, origmapname, false);
 						wad.Dispose();
 
 						if(mapindex != -1 && MessageBox.Show(General.MainWindow, "Target file already contains map '" + origmapname + "'\nDo you want to replace it?", "Map already exists!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) 
-- 
GitLab