--- a/MapReader.cpp
+++ b/MapReader.cpp
@@ -106,7 +106,10 @@
 			i = 0;
 
 			while(i<KEY_NAME_MAXLENGTH && ptr[i]!='\0' && ptr[i]!='\n' && (!isspace(ptr[i])))
-				key_name[i] = ptr[i++];
+				{
+					key_name[i] = ptr[i];
+					i++;
+				}
 			
 			if(i==KEY_NAME_MAXLENGTH)
 			{
