[Freeciv-Dev] Re: (PR#9492) big bug in 1.14.1
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9492 >
Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9492 >
>
> PR#9439 holds a significant bug in 1.14.1 (and probably many earlier
> versions). AFAICT rivers will never run west unless there is no other
> available direction (although I haven't really tested this).
Here's a patch.
jason
? server/output
Index: server/mapgen.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/mapgen.c,v
retrieving revision 1.99
diff -u -r1.99 mapgen.c
--- server/mapgen.c 29 Sep 2002 20:24:06 -0000 1.99
+++ server/mapgen.c 24 Jul 2004 05:43:34 -0000
@@ -611,7 +611,7 @@
generator select the direction. */
freelog(LOG_DEBUG, "mapgen.c: Had to let the random number"
" generator select a direction for a river.");
- direction = myrand(num_valid_directions - 1);
+ direction = myrand(num_valid_directions);
freelog(LOG_DEBUG, "mapgen.c: direction: %d", direction);
/* Find the direction that the random number generator selected. */
@@ -629,6 +629,7 @@
}
}
}
+ assert(direction == 0);
break;
} /* end switch (rd_number_of_directions()) */
|
|