🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

8 total messages Started by John Deragon Tue, 22 Dec 1992 09:35
Serious Bug fix....
#322
Author: John Deragon
Date: Tue, 22 Dec 1992 09:35
70 lines
2384 bytes
	The following is a context diff patch for the file shlmisc.c
It corrects a SERIOUS bug in the current GB version (GB5.2).  


	OVERVIEW:

	If you scrap a ship, it will kill the ship (ie: set the alive flag 
to false), but it will not remove it from the linked list until an 
update occurs.  Therefore, the dead ship will remain around, if you scrap
the same ship again, it will get a list of the ships via do_shiplist
and the now dead ship will still exist in the list.  This totally screws
things up, and you will end up scrapping whatever ship the nextship 
struct member points to. 


	FIX:

	Basically, this is a serious bug.  I seriously recommend patching
your shlmisc.c file if you have it.  It is basically a two line fix


	do_shiplist(...) 
	
		if (!(*s)->alive))
			return 0;

	but I did some additional formatting in that function for clarity.
This is only a temporary fix, I plan to clean this whole shiplist crap
up ALOT.  This way is pretty stupid.  

	Thanks for Valheru (ninja@halcyon.com) for pointing this one out


	-- Seeker	

-------------- BEGIN CONTEXT DIFF -------------

*** shlmisc.c   Tue Dec 22 03:45:17 1992
--- old/shlmisc.c       Tue Dec 22 03:41:15 1992
***************
*** 333,348 ****
  int do_shiplist(shiptype **s, int *nextshipno)
  {
      int shipno;

!     if (!(shipno = *nextshipno))
!               return 0;
!
!     if (!getship(s, shipno))  /* allocate memory, free in loop */
!               return 0;
!
!       if (!(*s)->alive)) /* this prevents it from returning a dead ship */
!               return 0;      /* ie: try to scrap a dead ship   JPD          */
!
      *nextshipno = (*s)->nextship;
      return shipno;
  }
--- 333,343 ----
  int do_shiplist(shiptype **s, int *nextshipno)
  {
      int shipno;
+     if(!(shipno = *nextshipno))
+       return 0;

!     if(!getship(s, shipno))   /* allocate memory, free in loop */
!       return 0;
      *nextshipno = (*s)->nextship;
      return shipno;
  }
Re: Serious Bug fix....
#325
Author: Jonathan Roy
Date: Tue, 22 Dec 1992 18:43
12 lines
937 bytes
 - Thanks for Valheru (ninja@halcyon.com) for pointing this one out

Sure thing. :) Since I can't code, yet, reporting bugs is the best
I can do. :D

Great job on your coding so far! We'll stir up new interest yet!

-- 
  F F  Jonathan Roy, Vice President, Free Access Foundation.    GEnie: J.ROY18
   A   Mail faf@halcyon.com for information, or FTP to halcyon.com:  /pub/faf/
  F F  "A server is a terrible thing to waste."    Internet: ninja@halcyon.com
 "Everything that has transpired has done so according to my design." - _RotJ_
Re: Serious Bug fix....
#327
Author: vancleef
Date: Wed, 23 Dec 1992 08:57
23 lines
1469 bytes
In article <1992Dec22.184322.8933@nwnexus.WA.COM>, ninja@halcyon.com (Jonathan Roy) writes:
>  - Thanks for Valheru (ninja@halcyon.com) for pointing this one out
> 
> Sure thing. :) Since I can't code, yet, reporting bugs is the best
> I can do. :D
> 
> Great job on your coding so far! We'll stir up new interest yet!
> 
> -- 
>   F F  Jonathan Roy, Vice President, Free Access Foundation.    GEnie: J.ROY18
>    A   Mail faf@halcyon.com for information, or FTP to halcyon.com:  /pub/faf/
>   F F  "A server is a terrible thing to waste."    Internet: ninja@halcyon.com
>  "Everything that has transpired has done so according to my design." - _RotJ_

I thought that the way I did the do_shiplist() and inlist() stuff was pretty
slick! It allowed the programmer to put in stuff like 'rep CDes' or 
'stock cd #1234' etc.

Take that stuff out and you really have something that stinks :) With my
code you can do 'load p fc' as opposed to loading 1000 pods by hand. Give me
a break please :)

-Garrett
Re: Serious Bug fix....
#329
Author: Dan A. Dickey
Date: Wed, 23 Dec 1992 15:01
32 lines
1774 bytes
In article <15215.2b37e39a@ohstpy.mps.ohio-state.edu>, vancleef@ohstpy.mps.ohio-state.edu writes:
> In article <1992Dec22.184322.8933@nwnexus.WA.COM>, ninja@halcyon.com (Jonathan Roy) writes:
> >  - Thanks for Valheru (ninja@halcyon.com) for pointing this one out
> > 
> > Sure thing. :) Since I can't code, yet, reporting bugs is the best
> > I can do. :D
> > 
> > Great job on your coding so far! We'll stir up new interest yet!
> > 
> > -- 
> >   F F  Jonathan Roy, Vice President, Free Access Foundation.    GEnie: J.ROY18
> 
> I thought that the way I did the do_shiplist() and inlist() stuff was pretty
> slick! It allowed the programmer to put in stuff like 'rep CDes' or 
> 'stock cd #1234' etc.
> 
> Take that stuff out and you really have something that stinks :) With my
> code you can do 'load p fc' as opposed to loading 1000 pods by hand. Give me
> a break please :)
> 
> -Garrett

The 'load p c' vs. hundreds of 'load #xyz c' is a fantastic
improvement.  Without it, metas would be unplayable.
(Unless of course, you have some "smart" interface that will handle
 it all for you).
In either case, it was a huge win when it appeared...
	-Hydra
-- 
---------
Dan A. Dickey      ddickey@cray.com
Re: Serious Bug fix....
#331
Author: Dan A. Dickey
Date: Wed, 23 Dec 1992 15:05
24 lines
1586 bytes
In article <1992Dec23.090129.17213@hemlock.cray.com> I wrote:
> In article <15215.2b37e39a@ohstpy.mps.ohio-state.edu>, vancleef@ohstpy.mps.ohio-state.edu writes:
> > I thought that the way I did the do_shiplist() and inlist() stuff was pretty
> > slick! It allowed the programmer to put in stuff like 'rep CDes' or 
> > 'stock cd #1234' etc.
> > 
> > Take that stuff out and you really have something that stinks :) With my
> > code you can do 'load p fc' as opposed to loading 1000 pods by hand. Give me
> > a break please :)
> > 
> > -Garrett
> 
> The 'load p c' vs. hundreds of 'load #xyz c' is a fantastic
> improvement.  Without it, metas would be unplayable.
> (Unless of course, you have some "smart" interface that will handle
>  it all for you).
> In either case, it was a huge win when it appeared...

P.S. - Now...if someone could just get around to modifying the
build command to handle something like 'build 200 p 0,0' !!
-- 
---------
Dan A. Dickey      ddickey@cray.com
Re: Serious Bug fix....
#332
Author: Jonathan Roy
Date: Wed, 23 Dec 1992 17:13
16 lines
1201 bytes
 - Take that stuff out and you really have something that stinks :)
 - With my code you can do 'load p fc' as opposed to loading 1000 pods
 - by hand. Give me a break please :)
 
Yes, that is pretty cool, but I never knew you could load multiple
items at once. There should be a doc file someplace that lists new
improvements in each upgrade. :)

Now, just gotta smash that horde of bugs...


-- 
  F F  Jonathan Roy, of the Free Access Foundation    Email: ninja@halcyon.com
   A   Mail faf@halcyon.com for information, or FTP to halcyon.com:  /pub/faf/
  F F  Valheru, of the Galactic Bloodshed Development Team      GEnie: J.ROY18
 "Everything that has transpired has done so according to my design." - _RotJ_
Re: Serious Bug fix....
#340
Author: Darren Paul Loher
Date: Thu, 24 Dec 1992 00:31
9 lines
890 bytes
ddickey@aspen34.cray.com (Dan A. Dickey) writes:

>P.S. - Now...if someone could just get around to modifying the
>build command to handle something like 'build 200 p 0,0' !!
>-- 
>---------
>Dan A. Dickey      ddickey@cray.com

Macros my man.... macros and the repeat command....
Re: Serious Bug fix....
#344
Author: Jonathan Roy
Date: Thu, 24 Dec 1992 05:19
16 lines
1155 bytes
 - With my code you can do 'load p fc' as opposed to loading 1000 pods
 - by hand. Give me a break please :)
 
Well, in the most recent 5.2 you've released, "load p fc" doesn't
work.

It simply loads fuel. Haven't tried the other commands since I don't
have enough ships to try... Is that a new command you have only in
your own version? (5.3?)
 
-- 
  F F  Jonathan Roy, of the Free Access Foundation    Email: ninja@halcyon.com
   A   Mail faf@halcyon.com for information, or FTP to halcyon.com:  /pub/faf/
  F F  Valheru, of the Galactic Bloodshed Development Team      GEnie: J.ROY18
 "Everything that has transpired has done so according to my design." - _RotJ_
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads