git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@368 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-16 12:07:47 +00:00
parent 1b98baa677
commit d496403c6a
4 changed files with 7 additions and 15 deletions

View File

@@ -193,13 +193,11 @@ MwClass MwMenuClass = &MwMenuClassRec;
MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) {
MwMenu m = menu == NULL ? handle->internal : menu;
MwMenu new = malloc(sizeof(*new));
new->name = malloc(strlen(name) + 1);
new->name = MwStringDupliacte(name);
new->sub = NULL;
new->wsub = NULL;
new->keep = 0;
strcpy(new->name, name);
arrput(m->sub, new);
set_xywh(handle);