[comp.sources.games.bugs] Omega3 Bugs

kwthomas@uokmax.UUCP (Kevin Thomas) (07/15/89)

There are a couple of bugs in the recently released omega3, version 0.75.
I found these playing the beta release (ftp'd from paul.rutgers.edu).  My
report to Laurence seems to have gone to /dev/null.

Problem 1:
In help, letters outside of the range of a to n pass the do while
test.  Unfortunately, the game will then fail in the open routines.

File:	  ocom3.c
Routine:  help
Old:	  while ((c < 'a') && (c > 'n') && (c != ESCAPE));
New:	  while (((c < 'a') || (c > 'n')) && (c != ESCAPE));

Problem 2:
In the "something name something says:  message" code, if the message is
"!Kurav tu andu nul!" (or something like that), the program can get hung
in an infinite loop, probably because of an array out of bounds.

File:	  omtalk.c
Routine:  m_talk_evil
Solution: in case 5, add a missing "break;" to the end of the line.

Problem 3:
Restoring a game fails.  The cause is a couple of lines of missing code.

[This bug appears to be fixed in the distributed code.  I haven't had time to 
test it because I haven't received all the parts yet.]

Problem 4:
The configuration file talks about compressing saved games, but doesn't tell
the user how to do it.

The solution is to add the missing line to "odefs":

#define	COMPRESS_SAVE_FILES

[Compressing save files is a space saving feature, and is optional.]

	Kevin W. Thomas
	National Severe Storms Laboratory
	1313 Halley Circle
	Norman, OK  73071

setzer@nssdcs.gsfc.nasa.gov (William Setzer (IDM)) (07/16/89)

In article <3494@uokmax.UUCP> kwthomas@uokmax.UUCP (Kevin Thomas) writes:
>There are a couple of bugs in the recently released omega3, version 0.75.
>I found these playing the beta release (ftp'd from paul.rutgers.edu).
[...]
>Problem 3:
>Restoring a game fails.  The cause is a couple of lines of missing code.

The fix is in file osave.c at line ~610 (counted by hand, so don't take
as gospel).  There is a sequence of lines in restore_player that looks like:

------
-    #ifndef MSDOS
-        fread((char *)&(Objects[i].known),sizeof(int),1,fd);
-    #else
         fread((char *)&(Objects[i].known),sizeof(Objects[i].known),1,fd);
-    #endif
------
(I added the minuses at the beginning of lines 1, 2, 3 and 5.)  Just
remove the lines starting with the minus and everything should work ok.
(The problem is that Objects[i].known is type 'uchar', not int.  I don't
know how it worked for Laurence.)
--
William Setzer
setzer@epsl.umd.edu   ; My 'real' mail address.

kwthomas@uokmax.UUCP (Kevin Thomas) (07/17/89)

In article <373@dftsrv.gsfc.nasa.gov# setzer@nssdcs.UUCP (William Setzer (IDM)) writes:
#In article <3494@uokmax.UUCP> kwthomas@uokmax.UUCP (Kevin Thomas) writes:
#>There are a couple of bugs in the recently released omega3, version 0.75.
#>I found these playing the beta release (ftp'd from paul.rutgers.edu).
#[...]
#>Problem 3:
#>Restoring a game fails.  The cause is a couple of lines of missing code.
#
#The fix is in file osave.c at line ~610 (counted by hand, so don't take
#as gospel).  There is a sequence of lines in restore_player that looks like:
#
#------
#-    #ifndef MSDOS
#-        fread((char *)&(Objects[i].known),sizeof(int),1,fd);
#-    #else
#         fread((char *)&(Objects[i].known),sizeof(Objects[i].known),1,fd);
#-    #endif
#------
#(I added the minuses at the beginning of lines 1, 2, 3 and 5.)  Just
#remove the lines starting with the minus and everything should work ok.
#(The problem is that Objects[i].known is type 'uchar', not int.  I don't
#know how it worked for Laurence.)
#--
#William Setzer
#setzer@epsl.umd.edu   ; My 'real' mail address.

That is what I did originally.  However, if you look at the release code, 
there is only one "fread" and "fwrite" in the code with the MSDOS dependency
removed.  That is why I didn't include the "bug fix" as the beta bug no
longer exists.

	== kwthomas ==

hardaker@iris.UCDavis.EDU (Wes Hardaker) (08/03/90)

In article <7810@pbhyf.PacBell.COM>, jdp@PacBell.COM (Jerry D. Pierce) writes:
> Anybody else having a similar problem?  Is there a newer version
> which fixes this problem??
> 

I have a similar problem when I save the game...  Have you tried this
yet?  Actually, the saving part goes fine, but when I try to start the
game again, it dumps core on me.  Kind of a pain, since I can't just
play all day long, and it's too long of a game to take a short time...
                                                                _____
							       / ___ \
Wes Hardaker					       	      / /   \/
Department of Electrical Engineering and Computer Science    \--/     /\
University of California at Davis	  _________________   \/     /--\
(hardaker@iris.ucdavis.edu)              /    Recycle      \    /\___/ /
                                        / Its not too late! \   \_____/