fixed finsh_var_delete issue which is found by Grissiom.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2103 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
09592b5df8
commit
3ac2f2b094
|
@ -10,6 +10,8 @@
|
|||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-22 Bernard first version
|
||||
* 2012-04-27 Bernard fixed finsh_var_delete issue which
|
||||
* is found by Grissiom.
|
||||
*/
|
||||
#include <finsh.h>
|
||||
#include "finsh_var.h"
|
||||
|
@ -58,7 +60,7 @@ int finsh_var_delete(const char* name)
|
|||
|
||||
for (i = 0; i < FINSH_VARIABLE_MAX; i ++)
|
||||
{
|
||||
if (strncpy(global_variable[i].name, name, FINSH_NAME_MAX) == 0)
|
||||
if (strncmp(global_variable[i].name, name, FINSH_NAME_MAX) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue