From 185ec37d3e0d28b0138b2d1277e815d31a1bf05a Mon Sep 17 00:00:00 2001 From: Rodrigo Madera Date: Sat, 27 Mar 2021 14:39:03 -0300 Subject: [PATCH] Make tray_menu::text a const char* for correctness. --- tray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tray.h b/tray.h index 6c87625..077cadf 100644 --- a/tray.h +++ b/tray.h @@ -9,7 +9,7 @@ struct tray { }; struct tray_menu { - char *text; + const char *text; int disabled; int checked; @@ -279,7 +279,7 @@ static HMENU _tray_menu(struct tray_menu *m, UINT *id) { item.fState |= MFS_CHECKED; } item.wID = *id; - item.dwTypeData = m->text; + item.dwTypeData = (LPSTR)m->text; item.dwItemData = (ULONG_PTR)m; InsertMenuItem(hmenu, *id, TRUE, &item);