mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
replace
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@368 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -93,8 +93,7 @@ static void llkeyrelhandler(MwLL handle, void* data) {
|
||||
MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height) {
|
||||
MwWidget h = malloc(sizeof(*h));
|
||||
|
||||
h->name = malloc(strlen(name) + 1);
|
||||
strcpy(h->name, name);
|
||||
h->name = MwStringDupliacte(name);
|
||||
|
||||
h->parent = parent;
|
||||
h->children = NULL;
|
||||
@@ -270,8 +269,7 @@ void MwSetText(MwWidget handle, const char* key, const char* value) {
|
||||
if(strcmp(key, MwNtitle) == 0) {
|
||||
MwLLSetTitle(handle->lowlevel, value);
|
||||
} else {
|
||||
char* v = malloc(strlen(value) + 1);
|
||||
strcpy(v, value);
|
||||
char* v = MwStringDupliacte(value);
|
||||
|
||||
if(shgeti(handle->text, key) != -1) free(shget(handle->text, key));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user