Re: [AD] load_datafile_object with properties |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, 2002-10-14 at 13:44, Eric Botcazou wrote:
> > About my first patch, it had another serious bug which I only fixed in
> > the linked-list version - I assumed the name property always is the
> > first one, which it isn't - so all properties need to be read in all the
> > time, in case the name matches.
>
> <sigh> I fixed that one, but got caught by its consequence: the property
> list needs to be freed for each new object. Revision c attached.
>
Heh, same happened with my linked-list version.
When applying the attached patch to your patch before patching, my
program works :)
--
Elias Pschernig
--- object_properties1c.diff 2002-10-14 13:33:48.000000000 +0200
+++ tmp.diff 2002-10-15 20:00:10.000000000 +0200
@@ -154,7 +154,7 @@
- while (d-- > 0)
- pack_getc(f);
+ ASSERT(list);
-+ ASSERT(property);
++ ASSERT(prop);
+
+ /* find the length of the list */
+ if (*list) {
@@ -412,7 +412,7 @@
+ }
+
+ /* attach the property list to the object */
-+ dat[c].prop = list;
++ dat->prop = list;
+ list = NULL;
+
+ break;