break;
}
+ /* should never happen
+ if(i >= MAX_INPUTLINE)
+ i = MAX_INPUTLINE - 1;
+ */
+
memcpy (line, text, i);
line[i] = 0;
}
else
{ // Invalid CVar
- Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(2) );
+ Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(1) );
}
}
}
*/
static void Cmd_ExecuteAlias (cmdalias_t *alias)
{
- static char buffer[ MAX_INPUTLINE + 2 ];
- static char buffer2[ MAX_INPUTLINE * 2 + 2 ];
+ static char buffer[ MAX_INPUTLINE ];
+ static char buffer2[ MAX_INPUTLINE ];
Cmd_PreprocessString( alias->value, buffer, sizeof(buffer) - 2, alias );
// insert at start of command buffer, so that aliases execute in order
// (fixes bug introduced by Black on 20050705)
-
+
// Note: Cbuf_PreprocessString will be called on this string AGAIN! So we
// have to make sure that no second variable expansion takes place, otherwise
// alias parameters containing dollar signs can have bad effects.