Skip to content

Commit 2a45208

Browse files
authored
Fix formatting and memory allocation in tray_windows.c
1 parent b14318f commit 2a45208

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/tray_windows.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ static HMENU _tray_menu(struct tray_menu *m, UINT *id) {
113113
item.fState |= MFS_CHECKED;
114114
}
115115
item.wID = *id;
116-
116+
117117
// Convert UTF-8 text to UTF-16 (wide string)
118118
int wide_size = MultiByteToWideChar(CP_UTF8, 0, m->text, -1, NULL, 0);
119-
wchar_t *wide_text = (wchar_t *)malloc(wide_size * sizeof(wchar_t));
119+
wchar_t *wide_text = (wchar_t *) malloc(wide_size * sizeof(wchar_t));
120120
MultiByteToWideChar(CP_UTF8, 0, m->text, -1, wide_text, wide_size);
121-
121+
122122
item.dwTypeData = wide_text;
123123
item.dwItemData = (ULONG_PTR) m;
124124

125125
InsertMenuItemW(hmenu, *id, TRUE, &item);
126-
126+
127127
// Free the allocated wide string
128128
free(wide_text);
129129
}

0 commit comments

Comments
 (0)