Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] Server hangs on an Alpha
Home

Re: [Freeciv-Dev] Server hangs on an Alpha

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Matthew OConnor <matthew@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Server hangs on an Alpha
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Jul 1999 01:35:58 +0000 (GMT)

> I changed the myrand(int size) to myrand(RANDOM_TYPE size) and
> recompiled.  The problem was still present.  I then changed the
> RANDOM_TYPE typedef from "unsigned int" to "unsigned long int" and the
> now the server doesn't hang anymore.  
It fixs this problem. But, it creates a cast from long int to int in lots
of place. And casts can create problems... 
> I haven't had a chance to make
> sure it is "working" correctly, but it no longer hangs.
That's already a good point.
> 
> (BTW both of my changes together should have counteracted the two
>  problems you noted above).

To be really sure, we have to parse mapgen.c. In all places a cast is done
from long int to int, we have to check the long int is no greater or
lesser to an int. If we can wipe out those long int it will be safer.

No time to do it tonigh,

Bye,

_("Nicolas")


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