Merge pull request #4 from zhaojuntao/fix-flex_button_register

[bug][flexible_button] fix `flex_button_register` api logical error
This commit is contained in:
MurphyZhao 2019-03-21 22:02:59 +08:00 committed by GitHub
commit 91cd3c9485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ int8_t flex_button_register(flex_button_t *button)
{
flex_button_t *curr = btn_head;
if (!button && (button_cnt > MAX_BUTTON_CNT))
if (!button || (button_cnt > MAX_BUTTON_CNT))
{
return -1;
}