提交 3ac2f2b0 编写于 作者: B bernard.xiong@gmail.com

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
上级 09592b5d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册