summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/menu_utils.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index 7b18c645ac..3d6d498883 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -940,8 +940,11 @@ static INT_PTR sttUpdateMenuService(WPARAM wParam, LPARAM)
mi.name.a = LPGEN("New submenu");
mi.position = 500050000;
BYTE *p = (BYTE*)&mi.uid;
- for (int i = 0; i < 16; i++)
- sscanf(&szCustomMenu[i*2], "%02x", &p[i]);
+ for (int i = 0; i < sizeof(MUUID); i++) {
+ int tmp;
+ sscanf(&szCustomMenu[i*2], "%02x", &tmp);
+ p[i] = tmp;
+ }
Menu_AddItem(pmo->id, &mi, NULL);
}