pwm command: Fix off-by-one in param parsing

This commit is contained in:
Lorenz Meier 2016-12-12 09:47:41 +01:00
parent f60bde9edd
commit cc92339602
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ get_parameter_value(const char *option, const char *paramDescription)
if (strncmp("p:", option, 2) == 0) {
char paramName[32];
strncpy(paramName, option + 2, 16);
strncpy(paramName, option + 2, 17);
/* user wants to use a param name */
param_t parm = param_find(paramName);