*not part of the build*
fix for 57781, 57790 git-svn-id: svn://10.0.0.236/trunk@94968 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -43,6 +43,9 @@ int Marshaler::WriteString(void *ptr, size_t size) {
|
||||
&& ptr) {
|
||||
size = 1;
|
||||
}
|
||||
if (!ptr) {
|
||||
size = 0;
|
||||
}
|
||||
out->write((const char*)&size, sizeof(size_t));
|
||||
if (size) {
|
||||
out->write((const char*)ptr,type2size(bc_T_CHAR)*size);
|
||||
|
||||
@@ -38,12 +38,12 @@ int UnMarshaler::ReadSimple(void *ptr, bcXPType type) {
|
||||
}
|
||||
int UnMarshaler::ReadString(void *ptr, size_t *size, bcIAllocator * allocator) {
|
||||
size_t length;
|
||||
*(char**)ptr = NULL;
|
||||
in->read((char*)size,sizeof(size_t));
|
||||
*(char**)ptr = (char *)allocator->Alloc(*size * type2size(bc_T_CHAR));
|
||||
if (*size) {
|
||||
*(char**)ptr = (char *)allocator->Alloc(*size * type2size(bc_T_CHAR));
|
||||
in->read(*(char**)ptr,*size * type2size(bc_T_CHAR));
|
||||
}
|
||||
|
||||
if (*size == 1) {
|
||||
if (!(*(char**)ptr)[0]) {
|
||||
*size = 0;
|
||||
|
||||
Reference in New Issue
Block a user