Index: /libmpc/trunk/mpcenc/config.h
===================================================================
--- /libmpc/trunk/mpcenc/config.h	(revision 451)
+++ /libmpc/trunk/mpcenc/config.h	(revision 452)
@@ -34,5 +34,5 @@
 #define MPCENC_MAJOR 1
 #define MPCENC_MINOR 30
-#define MPCENC_BUILD 0
+#define MPCENC_BUILD 1
 
 /* end of config.h */
Index: /libmpc/trunk/mpcenc/mpcenc.c
===================================================================
--- /libmpc/trunk/mpcenc/mpcenc.c	(revision 451)
+++ /libmpc/trunk/mpcenc/mpcenc.c	(revision 452)
@@ -841,8 +841,9 @@
     // if no Output-File is stated, set OutFile to InFile.mpc
     if ( *OutputFile == NULL  ) {
+	    char * ext = rindex(*InputFile, '.'); // search for extension delimiter
         strcpy ( *OutputFile = output, *InputFile );
         len = strlen ( output );
-        if ( len > 4  &&  output[len-4] == '.' )
-            len -= 4;
+		if (ext != 0 && (len - (ext - *InputFile)) < 7) // extension max size (5 chars)
+			len = ext - *InputFile;
         strcpy (output+len, ".mpc");
         argc -= 1;
