Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c,
Home

[Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c,

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 1 Sep 2004 21:34:35 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9899 >

> [kauf - Thu Sep 02 03:54:04 2004]:
> 
> On Wed, Sep 01, 2004 at 08:47:10PM -0700, Benoit Hudson wrote:
> The client sets (or should set) the continent number at:
> client/packhand.c:2013

OK; thanks.  Brett is right: it's related to byte order.  Basically, it's a bug 
to cast a short* to an 
int*.  On a little-endian machine, everything turns out fine because you just 
clobber the 
following field with a zero.  On a big-endian machine, you set your field to 
zero, and the 
following field to the right value (but then it'll be read next).

Patch attached for the bug we noticed; there's lots more casting to int* though 
that I am not 
fixing.

Attachment: fix_for_9899.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]