Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Yandex, Google

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
619
Alexander
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Bug] QUICKMATCH macro no lon...
Forum Rules | Mark all | Recent Posts

[Bug] QUICKMATCH macro no longer works as desired in GCC4
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 7, 2005, 12:18 am   Last edited May 11, 2005, 4:25 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: QUICKMATCH macro no longer works as desired in GCC4
Danger: Fatal for GCC4 users - compile will fail. None for GCC 3 users.
Found by: Zhamel
Fixed by: Samson

---

save.c, fwrite_obj

Locate:
   if( QUICKMATCH( obj->name, obj->pIndexData->name ) == 0 )
      fprintf( fp, "Name         %s~\n", obj->name );
   if( QUICKMATCH( obj->short_descr, obj->pIndexData->short_descr ) == 0 )
      fprintf( fp, "ShortDescr   %s~\n", obj->short_descr );
   if( QUICKMATCH( obj->description, obj->pIndexData->description ) == 0 )
      fprintf( fp, "Description  %s~\n", obj->description );
   if( QUICKMATCH( obj->action_desc, obj->pIndexData->action_desc ) == 0 )
      fprintf( fp, "ActionDesc   %s~\n", obj->action_desc );


Replace with:
   if( obj->name && obj->pIndexData->name && str_cmp( obj->name, obj->pIndexData->name ) )
      fprintf( fp, "Name         %s~\n", obj->name );
   if( obj->short_descr && obj->pIndexData->short_descr && str_cmp( obj->short_descr, obj->pIndexData->short_descr ) )
      fprintf( fp, "ShortDescr   %s~\n", obj->short_descr );
   if( obj->description && obj->pIndexData->description && str_cmp( obj->description, obj->pIndexData->description ) )
      fprintf( fp, "Description  %s~\n", obj->description );
   if( obj->action_desc && obj->pIndexData->action_desc && str_cmp( obj->action_desc, obj->pIndexData->action_desc ) )
      fprintf( fp, "ActionDesc   %s~\n", obj->action_desc );


Changes in the GCC compiler version 4 have rendered the QUICKMATCH macro useless in the situation above where the results are compared to 0. The strings were being checked to see if they do not match and so the best course of action to maintain consistency was to simply switch to calling str_cmp instead which will produce identical results.
       
Pages:<< prev 1 next >>