mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-12 11:11:16 +00:00
25 lines
383 B
C++
25 lines
383 B
C++
#include "mxdsobject.h"
|
|
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
void MxDSObject::SetObjectName(const char *p_name)
|
|
{
|
|
if (p_name != this->m_name)
|
|
{
|
|
free(this->m_name);
|
|
|
|
if (p_name) {
|
|
this->m_name = (char *)malloc(strlen(p_name) + 1);
|
|
|
|
if (this->m_name) {
|
|
strcpy(this->m_name, p_name);
|
|
}
|
|
}
|
|
else {
|
|
this->m_name = NULL;
|
|
}
|
|
}
|
|
}
|
|
|