Make tray_menu::text a const char* for correctness.

This commit is contained in:
Rodrigo Madera
2021-03-27 14:39:03 -03:00
committed by Dmitry Mikushin
parent 1180ae4db3
commit 185ec37d3e

4
tray.h
View File

@@ -9,7 +9,7 @@ struct tray {
}; };
struct tray_menu { struct tray_menu {
char *text; const char *text;
int disabled; int disabled;
int checked; int checked;
@@ -279,7 +279,7 @@ static HMENU _tray_menu(struct tray_menu *m, UINT *id) {
item.fState |= MFS_CHECKED; item.fState |= MFS_CHECKED;
} }
item.wID = *id; item.wID = *id;
item.dwTypeData = m->text; item.dwTypeData = (LPSTR)m->text;
item.dwItemData = (ULONG_PTR)m; item.dwItemData = (ULONG_PTR)m;
InsertMenuItem(hmenu, *id, TRUE, &item); InsertMenuItem(hmenu, *id, TRUE, &item);