[Freeciv-Dev] a plenty of bugs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
/*************************************************************************/
unused id "j" in /freeciv-cvs-Mar-27/client/gui-gtk/gotodlg.c
198:
for(i=0, j=0; i<game.nplayers; i++) {
/*************************************************************************/
unused code is obsolete in /freeciv-cvs-Mar-27/ai/aicity.c
443:
ai_city_defender_value(pcity, U_LEGION, bestchoice.choice)) * 2 &&
U_LEGION is no longer defined.
/*************************************************************************/
suspicious code in /freeciv-cvs-Mar-27/client/gui-gtk/dialogs.c
in function:
void popup_incite_dialog(struct city *pcity)
we find
984:
diplomat_target_id = pcity->id;
but in function:
void popup_bribe_dialog(struct unit *punit)
the following line is missing :(
diplomat_target_id = punit->id;
Is this deliberate. WHY?
/*************************************************************************/
suspicious code in /freeciv-cvs-Mar-27/intl/localealias.c
42:
#pragma alloca
correction:
# pragma alloca
/*************************************************************************/
bug in /freeciv-cvs-Mar-27/client/xaw/diplodlg.c
function:
struct Diplomacy_dialog *create_diplomacy_dialog(struct player *plr0,
struct player *plr1)
533:
get_ruler_title(plr1->government, plr0->is_male, plr0->nation),
correction:
get_ruler_title(plr1->government, plr1->is_male, plr1->nation),
/*************************************************************************/
suspicious code in /freeciv-cvs-Mar-27/server/mapgen.c
static void setup_isledata(void)
.
.
.
1044:
if(mingood+1<maxgood/game.nplayers)
mingood= maxgood/game.nplayers;
correction:
if(mingood<maxgood/game.nplayers) // +1 ??
mingood= maxgood/game.nplayers;
/*************************************************************************/
suspicious code in /freeciv-cvs-Mar-27/server/mapgen.c
static void setup_isledata(void)
.
.
.
1047:
if(goodisles>game.nPlayer()){
correction:
if(goodisles<game.nPlayer()){ // seems more logical
/*************************************************************************/
suspicious code in /freeciv-1.11.5/server/stdinhand.c
2592:
/* commands may be prefixed with SERVER_COMMAND_PREFIX,
even when given on the server command line - rp */
if (*cptr_s == SERVER_COMMAND_PREFIX) cptr_s++;
for(cptr_s=str; *cptr_s && !isalnum(*cptr_s); cptr_s++);
//cptr_s=str follows cptr_s++ ???
/*************************************************************************/
unused definition in
/home/styx/st/dev/fc/freeciv-cvs-Mar-27/client/include/colors_g.h
16:#define MAX_COLORS 256
/*************************************************************************/
unused declaration in /freeciv-cvs-Mar-27/client/gui-xaw/colors.h
22:int get_colors(Display *display);
/*************************************************************************/
line missing in /freeciv-cvs-Mar-27/client/gui-win32/colors.c
line missing in /freeciv-cvs-Mar-27/client/gui-mui/colors.c
24: { 86, 86, 86}, /* Background (gray) */
/*************************************************************************/
suspicious code in /freeciv-1.11.5/client/tilespec.c
in
static void tilespec_lookup_sprite_tags(void)
476:
603:
623: for(i=1; i<NUM_DIRECTION_NSEW; i++) {
/
580:
586:
591:
596:
...: for(i=0; i<NUM_DIRECTION_NSEW; i++)
correction?:
???
/*************************************************************************/
bug in /freeciv-1.11.5/ai/aiunit.c line 2295
static void ai_manage_barbarian_leader(struct player *pplayer, struct
unit *leader)
:
:
2295:
y = map_adjust_x(leader->y + dy);
correction:
2295: y = map_adjust_y(leader->y + dy);
/*************************************************************************/
bug in /freeciv-1.11.5/client/gui-xaw/helpdlg.c line 793
xaw_set_label(help_improvement_req_data, _("(Never)"));
793: create_tech_tree(help_tech_tree, 0, game.num_tech_types, 3);
correction:
/* A_LAST means NEVER */
793: create_tech_tree(help_tech_tree, 0, A_LAST, 3);
/*************************************************************************/
bug in /freeciv-1.11.5/common/registry.c line 439
if (i<columns_tab.n) {
astr_minsize(&entry_name, base_name.n + 10 + columns[i].n);
my_snprintf(entry_name.str, entry_name.n_alloc, "%s%d.%s",
base_name.str, table_lineno, columns[i].str);
} else {
439: astr_minsize(&entry_name, base_name.n + 20 + columns[i].n);
my_snprintf(entry_name.str, entry_name.n_alloc, "%s%d.%s,%d",
base_name.str, table_lineno,
columns[columns_tab.n-1].str, i-columns_tab.n+1);
}
correction:
439: astr_minsize(&entry_name, base_name.n + 20 +
columns[columns_tab.n-1].n);
/*************************************************************************/
bug in /freeciv-1.11.5/server/sernet.c line 432
char buf[BUF_SIZE+1];
:
:
432: if ((bufptr-buf) <= BUF_SIZE) bufptr++; /* prevent overrun */
correction:
432: if ((bufptr-buf) < BUF_SIZE) bufptr++; /* prevent overrun */
/*************************************************************************/
correction in /freeciv-1.11.5/server/ruleset.c/
function:
static void load_ruleset_nations(struct section_file *file)
1935:
if(val != A_LAST && val != A_NONE) {
freelog(LOG_DEBUG, "%s tech goal (%d) %3d %s", pl->name, j, val,
techs[j]);
pl->goals.tech[j] = val;
}
correction:
if(val != A_LAST && val != A_NONE) {
freelog(LOG_DEBUG, "%s tech goal (%d) %3d %s", pl->name, j, val,
techs[j]);
}
pl->goals.tech[j] = val;
/*************************************************************************/
suspicious declarations in /freeciv-1.11.5/client/gui-gtk/
the following callback functions for "button_release_event" and
"button_press_event" events
gtk_signal_connect(GTK_OBJECT(pdialog->present_unit_boxes[i]),
"button_release_event",
GTK_SIGNAL_FUNC(p_units_middle_callback), (gpointer)punit->id);
has different signatures:
gui-gtk/mapctrl.c ("button_release_event")
static gint popit_button_release(GtkWidget *w, GdkEventButton *event)
gui-gtk/mapctrl.c ("button_press_event")
gint butt_down_overviewcanvas(GtkWidget *w, GdkEventButton *ev)
gui-gtk/citydlg.c ("button_release_event")
gint p_units_middle_callback(GtkWidget *w, GdkEventButton *ev, gpointer
data)
gui-gtk/dialogs.c ("button_press_event")
void taxrates_callback( GtkWidget *w, GdkEventButton *event, gpointer data )
and so on.
PS: it's OK but bad code :8(
/*************************************************************************/
bug in /freeciv-1.11.5/server/cityhand.c/
function:
void handle_city_make_specialist(struct player *pplayer,
struct packet_city_request *preq)
329:
if (is_worker_here(pcity, preq->worker_x, preq->worker_y) ==
C_TILE_WORKER) {
correction:
if (is_worker_here(pcity, preq->worker_x, preq->worker_y)) {
- [Freeciv-Dev] a plenty of bugs,
Sylvain Tricot <=
|
|