Prevent users from cheating (fix #5990)

This commit is contained in:
Kilrah
2018-06-25 09:44:16 +02:00
parent af88b60c0e
commit c3b23fcc6e
3 changed files with 3 additions and 3 deletions
@@ -163,7 +163,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
CustomFunctionData *cfn = &functions[sub];
if (!CFN_EMPTY(cfn))
POPUP_MENU_ADD_ITEM(STR_COPY);
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION)
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION && isAssignableFunctionAvailable(clipboard.data.cfn.func))
POPUP_MENU_ADD_ITEM(STR_PASTE);
if (!CFN_EMPTY(cfn) && CFN_EMPTY(&functions[MAX_SPECIAL_FUNCTIONS-1]))
POPUP_MENU_ADD_ITEM(STR_INSERT);
@@ -153,7 +153,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
CustomFunctionData *cfn = &functions[sub];
if (!CFN_EMPTY(cfn))
POPUP_MENU_ADD_ITEM(STR_COPY);
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION)
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION && isAssignableFunctionAvailable(clipboard.data.cfn.func))
POPUP_MENU_ADD_ITEM(STR_PASTE);
if (!CFN_EMPTY(cfn) && CFN_EMPTY(&functions[MAX_SPECIAL_FUNCTIONS-1]))
POPUP_MENU_ADD_ITEM(STR_INSERT);
@@ -152,7 +152,7 @@ bool menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
CustomFunctionData *cfn = &functions[menuVerticalPosition];
if (!CFN_EMPTY(cfn))
POPUP_MENU_ADD_ITEM(STR_COPY);
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION)
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION && isAssignableFunctionAvailable(clipboard.data.cfn.func))
POPUP_MENU_ADD_ITEM(STR_PASTE);
if (!CFN_EMPTY(cfn) && CFN_EMPTY(&functions[MAX_SPECIAL_FUNCTIONS-1]))
POPUP_MENU_ADD_ITEM(STR_INSERT);