From 952e1cc8939f02778620fa3e61aeb901a4fa789f Mon Sep 17 00:00:00 2001
From: cybersphinx <chr.ohm@gmx.net>
Date: Tue, 19 Jul 2011 12:55:33 +0200
Subject: [PATCH 4/4] Don't remove file extensions from mod names.

Fixes loading of savegames with a mod, whether the mod is loaded from
the command line or not.

Old savegames won't work unfortunately, and savegames started with a .wz
mod won't continue if that mod gets expanded later.

Fixes #2735.
---
 src/main.cpp |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c987eee..7381d91 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -323,31 +323,6 @@ void addLoadedMod(const char * modname)
 		return;
 	}
 	char *mod = strdup(modname);
-	int modlen = strlen(mod);
-	if (modlen >= 3 && strcmp(&mod[modlen-3], ".wz")==0)
-	{
-		// remove ".wz" from end
-		mod[modlen-3] = 0;
-		modlen -= 3;
-	}
-	if (modlen >= 4 && strcmp(&mod[modlen-4], ".cam")==0)
-	{
-		// remove ".cam.wz" from end
-		mod[modlen-4] = 0;
-		modlen -= 4;
-	}
-	else if (modlen >= 4 && strcmp(&mod[modlen-4], ".mod")==0)
-	{
-		// remove ".mod.wz" from end
-		mod[modlen-4] = 0;
-		modlen -= 4;
-	}
-	else if (modlen >= 5 && strcmp(&mod[modlen-5], ".gmod")==0)
-	{
-		// remove ".gmod.wz" from end
-		mod[modlen-5] = 0;
-		modlen -= 5;
-	}
 	// Yes, this is an online insertion sort.
 	// I swear, for the numbers of mods this is going to be dealing with
 	// (i.e. 0 to 2), it really is faster than, say, Quicksort.
-- 
1.7.5.4


