diff --git a/game/console.c b/game/console.c index cbc6fa6..70cf817 100644 --- a/game/console.c +++ b/game/console.c @@ -455,7 +455,7 @@ static PARSED_COMMAND parse_command(const char *cmd) { extern int ghost_walls; extern int nofloors; -static int add_file_to_console(const char *name, LIST_FILE_TYPE , size_t, void *ctx) { +static int add_file_to_console(const char *name, LIST_FILE_TYPE _, size_t __, void *ctx) { int *cnt = (void *)ctx; char buff[20] = ""; for (int i = 0; i < 19; ++i) buff[i] = ' '; diff --git a/game/gamesave.c b/game/gamesave.c index 7d48131..081f05b 100644 --- a/game/gamesave.c +++ b/game/gamesave.c @@ -218,14 +218,14 @@ extern TSTR_LIST texty_v_mape; void save_map_description(TMPFILE_WR *f) { int count,max; - int i; + int32_t i; if (texty_v_mape==NULL) max=0;else max=str_count(texty_v_mape); for(i=0,count=0;iitems,items,(c-items)*sizeof(short)); } add_fly(n); + temp_storage_read(&sz,sizeof(sz),fsta); } - return 0; + return sz != 0; } @@ -441,9 +442,9 @@ int load_map_state() //obnovuje stav mapy; nutno volat po zavolani load_map; for (i=0;i>3]>>(i & 7)) & 1) map_coord[i].flags|=MC_DISCLOSED; load_map_description(fsta); - while (temp_storage_read(&i,sizeof(i),fsta) && i > 0 && i<=mapsize*4) + while (temp_storage_read(&i,sizeof(i),fsta) && i >= 0 && i<=mapsize*4) if (temp_storage_read(map_sides+i,1*sizeof(TSTENA),fsta)!=sizeof(TSTENA)) goto err; - while (temp_storage_read(&i,sizeof(i),fsta) && i >0 && i<=mapsize) + while (temp_storage_read(&i,sizeof(i),fsta) && i >= 0 && i<=mapsize) if (temp_storage_read(map_sectors+i,1*sizeof(TSECTOR),fsta)!=sizeof(TSECTOR)) goto err; if (reset_mobiles) //reloads mobiles if flag present { diff --git a/game/souboje.c b/game/souboje.c index 6cb1c1f..9c88ff8 100644 --- a/game/souboje.c +++ b/game/souboje.c @@ -705,7 +705,7 @@ void wire_end_game() for(i=0;i