Cosmetics and fix for segfault after legacy check in cable.c

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@849 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent cd7ea9388c
commit 4ecbb35521

@ -54,19 +54,17 @@ cmd_cable_run( char *params[] )
if (parport_drivers[i] != 0)
{
/* Old syntax was used. Swap params. */
char *tmparam;
printf( _("Note: the 'cable' command syntax changed, please read the help text\n") );
if (paramc >= 4)
{
char *tmparam;
tmparam = params[3];
params[3] = params[2];
params[2] = params[1];
params[1] = tmparam;
}
else if (paramc >= 3)
{
char *tmparam = params[2];
};
params[2] = params[1];
params[1] = tmparam;
else
return -1;
}
/* search cable driver list */

Loading…
Cancel
Save