Lines 1331-1337
Link Here
|
1331 |
const DataDef *def = client->protocol()->userDataDef(); |
1331 |
const DataDef *def = client->protocol()->userDataDef(); |
1332 |
size_t size = 0; |
1332 |
size_t size = 0; |
1333 |
for (const DataDef *d = def; d->name; ++d) |
1333 |
for (const DataDef *d = def; d->name; ++d) |
1334 |
size += sizeof(unsigned) * d->n_values; |
1334 |
size += sizeof(Data) * d->n_values; |
1335 |
data.data = malloc(size); |
1335 |
data.data = malloc(size); |
1336 |
load_data(def, data.data, cfg); |
1336 |
load_data(def, data.data, cfg); |
1337 |
p->push_back(data); |
1337 |
p->push_back(data); |
Lines 1344-1350
Link Here
|
1344 |
const DataDef *def = client->protocol()->userDataDef(); |
1344 |
const DataDef *def = client->protocol()->userDataDef(); |
1345 |
size_t size = 0; |
1345 |
size_t size = 0; |
1346 |
for (const DataDef *d = def; d->name; ++d) |
1346 |
for (const DataDef *d = def; d->name; ++d) |
1347 |
size += sizeof(unsigned) * d->n_values; |
1347 |
size += sizeof(Data) * d->n_values; |
1348 |
data.data = malloc(size); |
1348 |
data.data = malloc(size); |
1349 |
load_data(def, data.data, NULL); |
1349 |
load_data(def, data.data, NULL); |
1350 |
p->push_back(data); |
1350 |
p->push_back(data); |
Lines 1560-1566
Link Here
|
1560 |
} |
1560 |
} |
1561 |
size_t size = 0; |
1561 |
size_t size = 0; |
1562 |
for (const DataDef *def = (*it).def; def->name; ++def) |
1562 |
for (const DataDef *def = (*it).def; def->name; ++def) |
1563 |
size += sizeof(unsigned) * def->n_values; |
1563 |
size += sizeof(Data) * def->n_values; |
1564 |
userData[id] = malloc(size); |
1564 |
userData[id] = malloc(size); |
1565 |
load_data((*it).def, userData[id], NULL); |
1565 |
load_data((*it).def, userData[id], NULL); |
1566 |
return userData[id]; |
1566 |
return userData[id]; |