diff --git a/MapReader.cpp b/MapReader.cpp
index e64b636..bd1ab68 100644
--- a/MapReader.cpp
+++ b/MapReader.cpp
@@ -98,7 +98,10 @@ void MapReader::LoadMap(const char *filename,EventMapping *map)
 			
 			i = 0;
 			while(i<KEY_NAME_MAXLENGTH && ptr[i]!='\0' && ptr[i]!='\n' && ptr[i]!=' ')
-				key_name[i] = ptr[i++];
+			{
+				key_name[i] = ptr[i];
+				i++;
+			}
 			
 			if(i==KEY_NAME_MAXLENGTH)
 			{
