Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit d70f796

Browse files
[[ Bug 13103 ]] Menu items starting with '-', with more content, should not generate a menu separator
1 parent ba9249f commit d70f796

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/notes/bugfix-13103.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#option, pulldown and popUp menus don't accept negative numbers

engine/src/desktop-menu.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ class MCMenuBuilderCallback: public IParseMenuCallback
266266
if (!t_utf_title . Lock(p_menuitem -> label))
267267
return false;
268268

269-
if (MCStringGetCharAtIndex(p_menuitem -> label, 0) == '-')
269+
// SN-2014-08-05: [[ Bug 13103 ]] The item label must be "-" to be a menu separator,
270+
// not only start with '-'
271+
if (MCStringIsEqualToCString(p_menuitem -> label, "-", kMCStringOptionCompareExact))
270272
MCPlatformAddMenuSeparatorItem(TopMenu(), UINDEX_MAX);
271273
else
272274
{

0 commit comments

Comments
 (0)