bugfix strnzcpy

bugfix regatta
This commit is contained in:
Enno Rehling 2002-04-21 11:39:47 +00:00
parent a14379cb91
commit 1bcb841fcb
2 changed files with 4 additions and 13 deletions

View File

@ -244,6 +244,6 @@ extern char * strdup(const char *s);
#ifdef STRNCPY_HAS_ZEROTERMINATION
# define strnzcpy(dst, src, len) strncpy(dst, src, len)
#else
# define strnzcpy(dst, src, len) for(;;) { strncpy(dst, src, len); if (len) dst[len-1]=0; break; }
# define strnzcpy(dst, src, len) (strncpy(dst, src, len), len?dst[len-1]=0:0, dst)
#endif
#endif

View File

@ -2647,18 +2647,9 @@ fix_astralplane(void)
static int
fix_watchers(void)
{
plane * p = getplanebyid (59034966);
plane * p = getplanebyid (1094969858);
if (p) {
faction * f = findfaction(atoi36("gm04"));
watcher * w = calloc(sizeof(watcher), 1);
w->faction = f;
w->mode = see_unit;
w->next = p->watchers;
p->watchers = w;
}
p = getplanebyid(1137);
if (p) {
faction * f = findfaction(atoi36("rr"));
faction * f = findfaction(atoi36("rega"));
watcher * w = calloc(sizeof(watcher), 1);
w->faction = f;
w->mode = see_unit;
@ -2752,7 +2743,7 @@ korrektur(void)
/* fix_unitrefs(); */
stats();
do_once("sql2", dump_sql());
do_once("fw01", fix_watchers());
do_once("fw02", fix_watchers());
do_once("fxh2", fix_plainherbs());
#if NEW_RESOURCEGROWTH
/* do not remove do_once calls - old datafiles need them! */