Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling error (bug in apply.c)
- To: crossfire (at) ifi.uio.no,
- Subject: Re: compiling error (bug in apply.c)
- From: Mark Wedel <>
- Date: Fri, 8 Jul 1994 20:13:09 -0700
It is a bug in the code. treasure is also a structure name.
Apparantly, gcc gives precendence the the object *treasure, where
as your compiler gives precedence to the structure. Here
is a patch:
*** 1.37 1994/07/04 08:21:13
--- apply.c 1994/07/09 03:07:59
***************
*** 912,918 ****
return apply_container (op, tmp);
case TREASURE: {
! object *treasure;
if(QUERY_FLAG(tmp, FLAG_UNPAID)) {
draw_info(op,"You should pay for it first.");
break;
--- 912,918 ----
return apply_container (op, tmp);
case TREASURE: {
! object *treas;
if(QUERY_FLAG(tmp, FLAG_UNPAID)) {
draw_info(op,"You should pay for it first.");
break;
***************
*** 923,944 ****
prevents people fromt moving chests to more difficult maps to get better
treasure
*/
! treasure = tmp->inv;
! if(treasure==NULL) {
draw_info(op,"The chest was empty.");
decrease_ob(tmp);
return 1;
}
do {
! remove_ob(treasure);
! draw_find(op,treasure);
! treasure->x=op->x,treasure->y=op->y;
/* Changed (0.91.2) - always drop treasure to floor (needed for
* trap code
*/
! insert_ob_in_map(treasure,op->map);
! } while ((treasure=tmp->inv)!=NULL);
decrease_ob(tmp);
/* Done to re-stack map with player on top? */
--- 923,944 ----
prevents people fromt moving chests to more difficult maps to get better
treasure
*/
! treas = tmp->inv;
! if(treas==NULL) {
draw_info(op,"The chest was empty.");
decrease_ob(tmp);
return 1;
}
do {
! remove_ob(treas);
! draw_find(op,treas);
! treas->x=op->x,treas->y=op->y;
/* Changed (0.91.2) - always drop treasure to floor (needed for
* trap code
*/
! insert_ob_in_map(treas,op->map);
! } while ((treas=tmp->inv)!=NULL);
decrease_ob(tmp);
/* Done to re-stack map with player on top? */
You will probably need to use patch -l on this.
--Mark