Difference for server/apply.c from version 1.130 to 1.131


version 1.130 version 1.131
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.130 2005/07/19 20:59:34 ryo_saeba Exp $";   *   "$Id: apply.c,v 1.131 2005/07/19 22:52:39 akirschbaum Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 3811
 
Line 3811
     char* separator;      char* separator;
     int yield;      int yield;
     char got[ MAX_BUF ];      char got[ MAX_BUF ];
       int len;
   
     if ( !pl || !transformer )      if ( !pl || !transformer )
         return;          return;
Line 3832
 
Line 3833
         new_draw_info_format( NDI_UNIQUE, 0, pl, "You can't use the %s with your %s!", query_name( transformer ), query_name( marked ) );          new_draw_info_format( NDI_UNIQUE, 0, pl, "You can't use the %s with your %s!", query_name( transformer ), query_name( marked ) );
         return;          return;
         }          }
     memset( got, 0, MAX_BUF );  
     find += strlen( transformer->arch->name ) + 1;      find += strlen( transformer->arch->name ) + 1;
     /* Item can be used, now find how many and what it yields */      /* Item can be used, now find how many and what it yields */
     if ( isdigit( *( find ) ) )      if ( isdigit( *( find ) ) )
Line 3851
 
Line 3851
         find++;          find++;
     while ( *find == ' ' )      while ( *find == ' ' )
         find++;          find++;
       memset( got, 0, MAX_BUF );
     if ( (separator = strchr( find, ';' ))!=NULL)      if ( (separator = strchr( find, ';' ))!=NULL)
         {          {
         strncpy( got, find, MIN( separator - find, MAX_BUF ) );   len = separator - find;
         }          }
     else      else
         {          {
         strncpy( got, find, MAX_BUF );   len = strlen(find);
         }          }
       if ( len > MAX_BUF-1)
    len = MAX_BUF-1;
       strcpy( got, find );
       got[len] = '\0';
   
     /* Now create new item, remove used ones when required. */      /* Now create new item, remove used ones when required. */
     new_item = get_archetype( got );      new_item = get_archetype( got );


Legend:
line(s) removed in v.1.130 
line(s) changed
 line(s) added in v.1.131

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:22