|
From: <cro...@li...> - 2002-12-31 07:19:10
|
Module Name: crossfire
Committed By: mwedel
Date: Tue Dec 31 07:19:08 UTC 2002
Modified Files:
crossfire: ChangeLog
crossfire/server: time.c
Log Message:
server/time.c: Fix bad code in stop_arrow that caused crashes/improper
freeing of data.
MSW 2002-12-30
Start of context diffs
Index: crossfire/ChangeLog
diff -c crossfire/ChangeLog:1.27 crossfire/ChangeLog:1.28
*** crossfire/ChangeLog:1.27 Fri Dec 27 00:37:40 2002
--- crossfire/ChangeLog Mon Dec 30 23:19:07 2002
***************
*** 17,22 ****
--- 17,26 ----
------------------------------------------------------------------------------
Changes for CVS:
+ server/time.c: Fix bad code in stop_arrow that caused crashes/improper
+ freeing of data.
+ MSW 2002-12-30
+
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.
Index: crossfire/server/time.c
diff -c crossfire/server/time.c:1.47 crossfire/server/time.c:1.48
*** crossfire/server/time.c:1.47 Tue Dec 24 22:45:46 2002
--- crossfire/server/time.c Mon Dec 30 23:19:08 2002
***************
*** 1,6 ****
/*
* static char *rcsid_time_c =
! * "$Id: time.c,v 1.47 2002/12/25 06:45:46 garbled Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_time_c =
! * "$Id: time.c,v 1.48 2002/12/31 07:19:08 mwedel Exp $";
*/
/*
***************
*** 536,544 ****
op->stats.dam= op->stats.hp;
op->attacktype = op->stats.grace;
if (op->slaying != NULL)
! free(op->slaying);
if (op->spellarg != NULL) {
! op->slaying = strdup(op->spellarg);
free(op->spellarg);
} else
op->slaying = NULL;
--- 536,544 ----
op->stats.dam= op->stats.hp;
op->attacktype = op->stats.grace;
if (op->slaying != NULL)
! free_string (op->slaying);
if (op->spellarg != NULL) {
! op->slaying = add_string(op->spellarg);
free(op->spellarg);
} else
op->slaying = NULL;
|