Fix small error in previous commit that resulted in the fix not working as intended.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41501 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -844,7 +844,7 @@ apply_safe_mode_options(Menu* menu, char *buffer, size_t bufferSize)
|
|||||||
MenuItemIterator iterator = menu->ItemIterator();
|
MenuItemIterator iterator = menu->ItemIterator();
|
||||||
while (MenuItem* item = iterator.Next()) {
|
while (MenuItem* item = iterator.Next()) {
|
||||||
if (item->Type() == MENU_ITEM_SEPARATOR || !item->IsMarked()
|
if (item->Type() == MENU_ITEM_SEPARATOR || !item->IsMarked()
|
||||||
|| item->Data() == NULL || (uint32)pos > sizeof(buffer))
|
|| item->Data() == NULL || (uint32)pos >= bufferSize)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
size_t totalBytes = snprintf(buffer + pos, bufferSize - pos,
|
size_t totalBytes = snprintf(buffer + pos, bufferSize - pos,
|
||||||
|
|||||||
Reference in New Issue
Block a user