Fix CID 1291604

This commit is contained in:
Anton Kochkov 2015-04-19 05:32:48 +03:00
parent 173c1934a5
commit 6111f710ef

View File

@ -50,10 +50,16 @@ static int textlog_chat (RCore *core) {
static int cmd_log(void *data, const char *input) {
RCore *core = (RCore *)data;
const char *input2 = (input&&*input)?input + 1: "";
char *arg = strchr (input2, ' ');
int n = atoi (input2);
int n2 = arg? atoi (arg+1): 0;
char *arg, *input2;
int n, n2;
if (!input)
return 1;
input2 = (input && *input) ? input+1 : "";
arg = strchr (input2, ' ');
n = atoi (input2);
n2 = arg ? atoi (arg+1) : 0;
switch (*input) {
case 'e': // shell: less