On 2/14/07, Troman <[EMAIL PROTECTED]> wrote:
> The question is how the strings are stored - do we malloc up space for
> them when we read in the file?

When save games are loaded? I think loaded strings should be just copied
into the space allocated for string variables (union's .sval pointer).

That won't work, if I am reading you correctly.  The .sval pointer is
just that: a pointer.  You need to point it to some memory to store
the actual contents of the string.  The way to solve this is to find
out where .sval pointers come from in the normal running of the game.
Are they malloc()ed and later free()d, are they stored in a central
store with garbage collection for the scripting engine, or are they
stored in static buffers somewhere?  Once we know this, we can go
forward with fixing how they are stored in evntsave.c.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to