Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Google, Yahoo!

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Release Announcements » AFKMud 1.54 Released!
Forum Rules | Mark all | Recent Posts

AFKMud 1.54 Released!
< Newer Topic :: Older Topic > More improvements

Pages:<< prev 1 next >>
Post is unread #1 Jul 25, 2003, 12:03 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Version 1.54 of AFKMud has been released.

This is a bugfix/maintenance release.

Standard disclaimer type stuff: Changes in this version may or may not remain compatible with your
older support files, such as areas, commands, skills, socials, etc. If things break, you were warned.

Bugfixes this release:

Missing values from the ostat display were added. [Samson]
Prevented ACT_IMMORTAL mobs from being able to attack. [Adjani]
Prevented ACT_IMMORTAL mobs from being able to track. [Adjani]
Mob gold can now be set to -1 using the menu OLC. [Samson]
Web Server buffer overflow problem fixed. [Tomas Mecir]

Non-Bugfix alterations:

Removed the GET_INTERFACE and GET_WANT_RIPANSI connection states. [Samson]
Implemented the I3 permissions system for AFKMud. [Samson]
Messages added to inform new imms their I3 access elevated. [Samson]
Compatibility fix in I3 settings loaded from pfiles. [Samson]
       
Post is unread #2 Jul 25, 2003, 6:52 am   Last edited Nov 24, 2007, 12:41 am by Samson
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Getting a compile error here.. RedHat 7.3 machine

websvr.c: In function `handle_web':
websvr.c:377: parse error before `int'
websvr.c:378: `curlen' undeclared (first use in this function)
websvr.c:378: (Each undeclared identifier is reported only once
websvr.c:378: for each function it appears in.)
make[1]: *** [o/websvr.o] Error 1

Checked the code - LOOKS alright. That's both with the patch and with the downloaded distro.


[jwalker@kenetix src]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[jwalker@kenetix src]$

I can't see anything wrong with the code though.

      if( FD_ISSET( current->fd, &readfds ) ) /* We Got Data! */
        {
           char buf[MAXDATA];
           int numbytes;

           if( ( numbytes = read( current->fd, buf, sizeof(buf) ) ) == -1 )
           {
                perror( "web-read" );
                continue;
           }

           buf[numbytes] = '�';

           /* ensure that we won't crash on a buffer overflow */
           int curlen = strlen( current->request );
           strncat( current->request, buf, 2 * MAXDATA - curlen - 6 );
           /* we don't want to miss the trailing ENDREQUEST */
           if( strlen( current->request ) == 2 * MAXDATA - 6 )  /* buffer size reached */
           /* we could miss the end of request, but we don't need it anyway */
              strcat( current->request, ENDREQUEST );
        }
   } /* DONE WITH DATA IN */  


that's the block there I do think. It'd error out earlier if not.

-- X
       
Post is unread #3 Jul 25, 2003, 7:15 am   Last edited Nov 24, 2007, 12:41 am by Samson
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Erm.. Fixed it up right quick when I looked again.

if( FD_ISSET( current->fd, &readfds ) ) /* We Got Data! */
       {
          char buf[MAXDATA];
          int numbytes;
          int curlen;

          if( ( numbytes = read( current->fd, buf, sizeof(buf) ) ) == -1 )
          {
               perror( "web-read" );
               continue;
          }

          buf[numbytes] = '�';

          /* ensure that we won't crash on a buffer overflow */
          curlen = strlen( current->request );
          strncat( current->request, buf, 2 * MAXDATA - curlen - 6 );
          /* we don't want to miss the trailing ENDREQUEST */
          if( strlen( current->request ) == 2 * MAXDATA - 6 )  /* buffer size reached */
          /* we could miss the end of request, but we don't need it anyway */
             strcat( current->request, ENDREQUEST );
       }
  } /* DONE WITH DATA IN */  


Basically I defined curlen up at the top with the other variables. For some reason my compiler didn't like the placement of that definition. ;)

-- X
       
Post is unread #4 Jul 25, 2003, 10:22 am   Last edited Nov 24, 2007, 12:41 am by Samson
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Hmmm, poking around the memory that working in PERL hasn't corrupted yet....

In standard ANSI C, all variable declarations have to occur at the top of the block whose scope they belong to, in ancient K&R, they had to occur at the top of the function. I learned C before the ANSI C99 definition existed, so if they changed it there... YMMV. I think you can get away with declaring anywhere in C++, but I don't know C++ very well.

THUS:
void foo(void) {
 int a = 1; // ok
 printf("%s
", blah());
 { int b = 2; //ok
    printf("%d\n", b);
 }
 int c = 3; // bzzzt
}
       
Post is unread #5 Jul 25, 2003, 2:14 pm
Go to the top of the page
Go to the bottom of the page

Cam

GroupAFKMud Team
Posts61
JoinedJan 1, 2002

In C++ a variable need be declared merely before it is invoked. It doesn't matter where (not counting things like in the middle of a function, etc ;P) or how soon before.

And I'm not even a coder!
       
Post is unread #6 Jul 25, 2003, 6:48 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

This would be one of those lovely examples of how things have chaged under GCC3 and didn't get caught. I'll have to modify the patch and the distro later after work. Right now I can't do anything about it.


Edit: Ok, after taking a quicky look, the patch would have been too much of a pain to fix, so I only fixed this in the main distro package. It's a relatively minor thing that will only crop up if you aren't using gcc3, and most recent distros are doing that anyway. This will only affect patch users regardless. So if you get this, just follow the above fix to solve it.
       
Pages:<< prev 1 next >>