1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Description: Include time.h, fix two warnings in fscanf calls.
Author: Bernhard Übelacker <bernhardu@mailbox.org>
Bug-Debian: https://bugs.debian.org/968375
Forwarded: no
Last-Update: 2020-08-14
Index: scottfree-1.14/ScottCurses.c
===================================================================
--- scottfree-1.14.orig/ScottCurses.c
+++ scottfree-1.14/ScottCurses.c
@@ -22,6 +22,7 @@
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
+#include <time.h>
#include "Scott.h"
@@ -239,7 +240,7 @@ void LoadDatabase(FILE *f, int loud)
/* Load the header */
if(fscanf(f,"%*d %d %d %d %d %d %d %d %d %d %d %d",
- &ni,&na,&nw,&nr,&mc,&pr,&tr,&wl,<,&mn,&trm,&ct)<10)
+ &ni,&na,&nw,&nr,&mc,&pr,&tr,&wl,<,&mn,&trm)<10)
Fatal("Invalid database(bad header)");
GameHeader.NumItems=ni;
Items=(Item *)MemAlloc(sizeof(Item)*(ni+1));
@@ -693,7 +694,7 @@ void LoadGame(char *name)
{
fscanf(f,"%d %d\n",&Counters[ct],&RoomSaved[ct]);
}
- fscanf(f,"%ld %d %hd %d %d %hd\n",
+ fscanf(f,"%ld %hd %hd %d %d %hd\n",
&BitFlags,&DarkFlag,&MyLoc,&CurrentCounter,&SavedRoom,
&GameHeader.LightTime);
/* Backward compatibility */
|