Fix compiler warning [-Wstringop-overflow=]

This commit is contained in:
Albrecht Schlosser 2024-10-12 15:27:25 +02:00
parent 013e939c93
commit a5f28b3984

View File

@ -533,7 +533,7 @@ void Fl_Menu_::menu(const Fl_Menu_Item* m) {
See void Fl_Menu_::menu(const Fl_Menu_Item* m).
*/
void Fl_Menu_::copy(const Fl_Menu_Item* m, void* ud) {
int n = m->size();
unsigned int n = m->size();
Fl_Menu_Item* newMenu = new Fl_Menu_Item[n];
memcpy(newMenu, m, n*sizeof(Fl_Menu_Item));
menu(newMenu);