diff --git a/arogue5/state.c b/arogue5/state.c index f5fdb43..648d65c 100644 --- a/arogue5/state.c +++ b/arogue5/state.c @@ -641,7 +641,10 @@ rs_read_ulong(int inf, unsigned long *i) buf = bytes; } - *i = *((unsigned long *) buf); + if ( (sizeof(long) == 8) && (sizeof(int) == 4) ) + *i = *((unsigned int *) buf); + else + *i = *((unsigned long *) buf); return(READSTAT); } @@ -1515,6 +1518,8 @@ rs_read_daemons(int inf, struct delayed_action *d_list, int count) } rs_read_int(inf, &d_list[i].d_arg); + if (func == 2) + d_list[i].d_arg = &player; rs_read_int(inf, &d_list[i].d_time); if (d_list[i].d_func == NULL)