[Freeciv-Dev] Re: (PR#8749) Scenario fixes
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8749 >
Per Inge Mathisen wrote:
> + str = secfile_lookup_str_default(file, NULL, "map.r%dsnation", i);
> + if (str != NULL) {
> + map.start_positions[i].nation = find_nation_by_name_orig(str);
> + } else {
> + map.start_positions[i].nation = i; /* and hope for the best... */
> + }
> i++;
> }
There's a bug here. find_nation_by_name_orig can return
NO_NATION_SELECTED (-1) if the nations isn't present, but you don't
handle this either here or later. This is a user error so it should
either be handled or the server should exit gracefully.
jason
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, (continued)
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Per Inge Mathisen, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Mike Kaufman, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Mike Kaufman, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/15
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Per Inge Mathisen, 2004/05/16
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes,
Jason Short <=
- [Freeciv-Dev] Re: (PR#8749) Scenario fixes, Jason Short, 2004/05/17
|
|