🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.games.hack
Article #519

Bug in hack 1.0.1

#519
From: Donald F. Picard
Date: Tue, 30 Apr 1985 23:14
45 lines
1929 bytes
[]

There is a bug in version 1.0.1 ( I don't know if it is in 1.0.2 because
I haven't brought it up yet) in the file "hack.stat.c".  The game
checks the inode change time of files against the inode change time of
the game to make sure that they (the files) are up to date.  I assume
that this is an attempt to make sure that people are not trying to
restore saved games (and ghost levels) that were created under a previous
version of the game.  The only problem is that the inode change time
gets updated for a lot of reasons, not just "file creation".

I recently lost a saved game (and a good one too!) because somebody here
made a symbolic link to the game. (Don't ask me why.)  This updated the
inode change time of the game and so the next time I tried to play
it told me that my saved game was out of date and threw it away!

I don't know why the author chose to check the c_time field over the
m_time field, but that is my suggested fix.

A context diff follows.

					Don Picard
					Axiom Technology
					... linus!axiom!don

*** hack.stat.c
--- hack.stat.c.new
***************
*** 17,23
  		pline("Cannot get status?");
  		return(0);
  	}
! 	if(buf.st_ctime < hbuf.st_ctime) {
  		pline("Saved level is out of date.");
  		return(0);
  	}

--- 17,23 -----
  		pline("Cannot get status?");
  		return(0);
  	}
! 	if(buf.st_mtime < hbuf.st_mtime) {
  		pline("Saved level is out of date.");
  		return(0);
  	}
Technical Details
Message-ID: <38@axiom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!axiom!don

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site axiom.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!axiom!don
From: don@axiom.UUCP (Donald F. Picard)
Newsgroups: net.games.hack
Subject: Bug in hack 1.0.1
Message-ID: <38@axiom.UUCP>
Date: Tue, 30-Apr-85 19:14:42 EDT
Article-I.D.: axiom.38
Posted: Tue Apr 30 19:14:42 1985
Date-Received: Wed, 1-May-85 07:26:01 EDT
Organization: Axiom Technology, Newton MA
Lines: 45