Use d_strdup for ui_add_gadget_button

This commit is contained in:
Kp 2013-12-05 00:10:35 +00:00
parent 0603067145
commit be0e9f5162

View file

@ -20,6 +20,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include <stdlib.h>
#include <string.h>
#include "strutil.h"
#include "u_mem.h"
#include "maths.h"
#include "pstypes.h"
@ -109,8 +110,7 @@ UI_GADGET_BUTTON * ui_add_gadget_button( UI_DIALOG * dlg, short x, short y, shor
if ( text )
{
MALLOC( button->text, char, strlen(text)+1 );
strcpy( button->text, text );
button->text = d_strdup(text);
} else {
button->text = NULL;
}