Server/Database: Reduce differences between 3.3.5 and 6.x branches
This commit is contained in:
1 parent
085dd6a21d
commit
5db8edd611
5 files changed
+57
-16
No files matched your search
@@ -47,10 +47,10 @@ void Field::SetStructuredValue(char* newValue, enum_field_types newType)
|
||||
// This value stores somewhat structured data that needs function style casting
|
||||
if (newValue)
|
||||
{
|
||||
size_t size = strlen(newValue);
|
||||
data.value = new char [size+1];
|
||||
strcpy((char*)data.value, newValue);
|
||||
data.length = size;
|
||||
data.value = new char[length + 1];
|
||||
memcpy(data.value, newValue, length);
|
||||
*(reinterpret_cast<char*>(data.value) + length) = '\0';
|
||||
data.length = length;
|
||||
}
|
||||
|
||||
data.type = newType;
|
||||
|
||||
Reference in new issue
Block a user