Fix a silly invalid read operation
This commit is contained in:
parent
1480b7e9c0
commit
b3ed3a5526
|
@ -756,7 +756,7 @@ char* adc_msg_get_argument(struct adc_message* cmd, int offset)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
argument = hub_strdup(&start[1]);
|
argument = hub_strdup(&start[1]);
|
||||||
if (argument && argument[strlen(argument)-1] == '\n')
|
if (argument && *argument && argument[strlen(argument)-1] == '\n')
|
||||||
argument[strlen(argument)-1] = 0;
|
argument[strlen(argument)-1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue