fix bug in eet decode of list and hashes of simple types. a bug waiting to

happen for sure.


SVN revision: 34384
This commit is contained in:
Carsten Haitzler 2008-04-28 03:04:26 +00:00
parent 9d4f099a78
commit 5fccc31519
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2008-04-20 Carsten Haitzler (The Rasterman)
1.0.0 release
2008-04-28 Carsten Haitzler (The Rasterman)
* Fixed allocation of a list (EET_G_LIST) of simple types
(IS_SIMPLE_TYPE) to alloc the correct amount (using the correct type
offset). Also fixed a hash (EET_G_HASH) of simple types too.

View File

@ -2111,7 +2111,7 @@ _eet_data_descriptor_decode(const Eet_Dictionary *ed,
data_ret = NULL;
if (IS_SIMPLE_TYPE(type))
{
data_ret = calloc(1, eet_coder[type].size);
data_ret = calloc(1, eet_coder[type - 1].size);
if (data_ret)
{
_eet_freelist_add(data_ret);
@ -2171,7 +2171,7 @@ _eet_data_descriptor_decode(const Eet_Dictionary *ed,
if (!echnk.name) goto error;
if (IS_SIMPLE_TYPE(type))
{
data_ret = calloc(1, eet_coder[type].size);
data_ret = calloc(1, eet_coder[type - 1].size);
if (data_ret)
{
_eet_freelist_add(data_ret);