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

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

[Top] [All Lists]

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

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

On Wed, 1 Sep 2004, Benoit Hudson wrote:
> 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.

This patch does not help, since you fix an autogenerated file. We will
need to fix common/generate_packets.py, which is a python script, so I
cannot help out there.

  - Per




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