Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site water.UUCP
Path: utzoo!watmath!water!kcwellsch
From: kcwellsch@water.UUCP (Ken C. Wellsch)
Newsgroups: net.games.emp
Subject: Bug in `shipdamage' (boring details)
Message-ID: <685@water.UUCP>
Date: Fri, 5-Jul-85 11:00:11 EDT
Article-I.D.: water.685
Posted: Fri Jul  5 11:00:11 1985
Date-Received: Sat, 6-Jul-85 09:36:39 EDT
Distribution: net
Organization: U of Waterloo, Ontario
Lines: 33

Bug Report
Function: shipdamage()
Export Version: Jun 9, 1984.

  I was looking through the `shipdamage' function from
  "Export Version of Jun 9, 1984" and noticed that the
  items in `shp_v[]' are not `correctly' damaged.

  Each entry in `shp_v[]' should be checked to see whether
  it is an item using vchrstr, (vchr[type].vch_flag == VCH_ITEM),
  which then implies that it can be damaged.

  In fact, whatever sector currently resides in `sect' is
  indexed to get the type rather than the ship structure.
  The index range is correctly obtained with respect to the ship
  in question but `sect.sct_v[i].v_type' is indexed rather
  than `shp->shp_v[i].v_type' for the entry type.
  
  This implies that some unrelated type is obtained and if it
  should be an `item' then whatever is contained at that index on
  the ship will be damaged. Naturally the items damaged on the
  ship will not follow a logical pattern, and should the type
  field of whatever is in `sect' contain a bizarre value, then
  the indexing of `vchr' will be out to lunch.

  I should expect such an obvious bug has been fixed in later
  releases...

					Ken Wellsch

------
Ken C. Wellsch
{decvax,clyde,ihnp4,allegra}!watmath!water!kcwellsch