Re: Bug in mc command line



Hello Pavel,

On Tue, 2004-11-09 at 08:12, Pavel Shirshov (pchel) wrote:
> Hello mc-devel,
> 
>   Please, enter in command line:
> 
>   $ cat cisco.log | grep %LINK-3-UPDOWN
> 
>   Press Enter, and you'll get
> 
>   $ cat cisco.log | grep %INK-3-UPDOWN

This looks like easyfix. It needs testing though.

greetings,
Jindrich

-- 
Jindrich Novy <jnovy redhat com>, http://people.redhat.com/jnovy/
--- mc-4.6.1-20041109/src/command.c.jn	2004-11-03 20:43:17.000000000 +0100
+++ mc-4.6.1-20041109/src/command.c	2004-11-09 15:05:02.745905432 +0100
@@ -232,8 +232,7 @@ enter (WInput *cmdline)
 	command[0] = 0;
 	for (i = j = 0; i < strlen (cmd); i++) {
 	    if (cmd[i] == '%') {
-		i++;
-		s = expand_format (NULL, cmd[i], 1);
+		s = expand_format (NULL, cmd[i+1], 1);
 		command = g_realloc (command, strlen (command) + strlen (s)
 				     + strlen (cmd) - i + 1);
 		strcat (command, s);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]