|
From: <cro...@li...> - 2002-12-27 08:37:42
|
Module Name: crossfire
Committed By: mwedel
Date: Fri Dec 27 08:37:41 UTC 2002
Modified Files:
crossfire: ChangeLog
crossfire/common: treasure.c
crossfire/server: player.c
crossfire/socket: loop.c
Log Message:
common/treasure.c: Fix initialization of treasure structs to use calloc.
server/player.c: Fix infinite loop.
socket/loop.c: Make sure we put in null terminator for socket data.
MSW 2002-12-26
Start of context diffs
Index: crossfire/ChangeLog
diff -c crossfire/ChangeLog:1.26 crossfire/ChangeLog:1.27
*** crossfire/ChangeLog:1.26 Tue Dec 24 22:45:46 2002
--- crossfire/ChangeLog Fri Dec 27 00:37:40 2002
***************
*** 17,22 ****
--- 17,28 ----
------------------------------------------------------------------------------
Changes for CVS:
+ common/treasure.c: Fix initialization of treasure structs to use calloc.
+ server/player.c: Fix infinite loop.
+ socket/loop.c: Make sure we put in null terminator for socket data.
+ MSW 2002-12-26
+
+
New Arrow and Pet Code:
Add bowmode and petmode commands. Allowing the player to change the firing
style for bows to one of either threewide, or spreadshot.
Index: crossfire/common/treasure.c
diff -c crossfire/common/treasure.c:1.29 crossfire/common/treasure.c:1.30
*** crossfire/common/treasure.c:1.29 Mon Aug 26 00:14:10 2002
--- crossfire/common/treasure.c Fri Dec 27 00:37:41 2002
***************
*** 1,7 ****
/*
* static char *rcs_treasure_c =
! * "$Id: treasure.c,v 1.29 2002/08/26 07:14:10 mwedel Exp $";
*/
/*
--- 1,7 ----
/*
* static char *rcs_treasure_c =
! * "$Id: treasure.c,v 1.30 2002/12/27 08:37:41 mwedel Exp $";
*/
/*
***************
*** 83,89 ****
*/
static treasure *get_empty_treasure() {
! treasure *t = (treasure *) malloc(sizeof(treasure));
if(t==NULL)
fatal(OUT_OF_MEMORY);
t->item=NULL;
--- 83,89 ----
*/
static treasure *get_empty_treasure() {
! treasure *t = (treasure *) calloc(1,sizeof(treasure));
if(t==NULL)
fatal(OUT_OF_MEMORY);
t->item=NULL;
Index: crossfire/server/player.c
diff -c crossfire/server/player.c:1.112 crossfire/server/player.c:1.113
*** crossfire/server/player.c:1.112 Tue Dec 24 22:45:46 2002
--- crossfire/server/player.c Fri Dec 27 00:37:41 2002
***************
*** 1,6 ****
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.112 2002/12/25 06:45:46 garbled Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.113 2002/12/27 08:37:41 mwedel Exp $";
*/
/*
***************
*** 1767,1773 ****
* on the space
*/
while (tmp!=NULL) {
! if (tmp == op) continue;
if (QUERY_FLAG(tmp,FLAG_ALIVE)) {
mon = tmp;
break;
--- 1767,1776 ----
* on the space
*/
while (tmp!=NULL) {
! if (tmp == op) {
! tmp=tmp->above;
! continue;
! }
if (QUERY_FLAG(tmp,FLAG_ALIVE)) {
mon = tmp;
break;
Index: crossfire/socket/loop.c
diff -c crossfire/socket/loop.c:1.20 crossfire/socket/loop.c:1.21
*** crossfire/socket/loop.c:1.20 Sun Oct 27 20:36:17 2002
--- crossfire/socket/loop.c Fri Dec 27 00:37:41 2002
***************
*** 1,7 ****
/*
* static char *rcsid_loop_c =
! * "$Id: loop.c,v 1.20 2002/10/28 04:36:17 garbled Exp $";
*/
/*
--- 1,7 ----
/*
* static char *rcsid_loop_c =
! * "$Id: loop.c,v 1.21 2002/12/27 08:37:41 mwedel Exp $";
*/
/*
***************
*** 187,192 ****
--- 187,194 ----
return;
}
} while (ns->inbuf.buf[ns->inbuf.len++]!='\n');
+
+ ns->inbuf.buf[ns->inbuf.len]=0;
cp = strchr(ns->inbuf.buf, ' ');
if (cp) {
|