Open gzied opened 1 year ago
using pgm_read_word for getting pointers will trim the pointers on 32bits targets. please use pgm_read_ptr instead.
fixed Menu.cpp shall be const char Engine::getLabel(const Item_t item) const { return (const char *)pgm_read_ptr((item == NULL) ? ¤tItem->Label : &item->Label); }
const Item_t Engine::getPrev(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Previous : &item->Previous); }
const Item_t Engine::getNext(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Next : &item->Next); }
const Item_t Engine::getParent(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Parent : &item->Parent); }
const Item_t Engine::getChild(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Child : &item->Child); }
using pgm_read_word for getting pointers will trim the pointers on 32bits targets. please use pgm_read_ptr instead.
fixed Menu.cpp shall be const char Engine::getLabel(const Item_t item) const { return (const char *)pgm_read_ptr((item == NULL) ? ¤tItem->Label : &item->Label); }
const Item_t Engine::getPrev(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Previous : &item->Previous); }
const Item_t Engine::getNext(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Next : &item->Next); }
const Item_t Engine::getParent(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Parent : &item->Parent); }
const Item_t Engine::getChild(const Item_t item) const { return (const Item_t *)pgm_read_ptr((item == NULL) ? ¤tItem->Child : &item->Child); }