[Freeciv-Dev] Re: indefinite improvements
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 2000/08/20 01:22 , David Pfitzner wrote:
>
>One likely problem I noticed is in common/worklist.h:
>
>#define WORKLIST_END (U_LAST+B_LAST+MAX_NUM_WORKLISTS)
>
>This value is used in protocol and in savegames as a marker
>past last used entry in worklist. Since this patch changes B_LAST,
>the numerical value of WORKLIST_END changes (from 284 to 416?) which
>I guess means problems (I haven't looked).
>
>Suggested fixes: Use (-1), or 0xFFFF for WORKLIST_END, and
>use some sort of work-around for code which currently checks
>for specific value of WORKLIST_END (eg, look for out-of-range
>value, or 284 from old clients, etc).
Thanks!
I changed WORKLIST_END to 0xFFFF, and simply changed the save-file loader
to translate 284 to (the new) WORKLIST_END when loading old save-files
(discriminated by a new SAVEFILE_OPTION, "new_worklist_end"). The rest of
the code shouldn't have to change.
Also, updated the patch to latest CVS version.
indef-impr-8.diff.gz
Description: Binary data
jjm
|
|