--- deliantra/server/server/skills.c 2006/06/06 23:32:27 1.3 +++ deliantra/server/server/skills.c 2006/07/01 21:04:42 1.5 @@ -297,7 +297,8 @@ // reduce monster experience by experience we gained, as to // limit the amount of exp that can be gained by stealing from monsters // (jessies gave ~20,000,000 exp otherwise. - int exp = MIN (tmp->stats.exp, calc_skill_exp (op,tmp, skill)); + int exp = calc_skill_exp (op, tmp, skill); + exp = MIN (tmp->stats.exp, exp); tmp->stats.exp -= exp; return exp; } @@ -1119,7 +1120,7 @@ */ static int write_note(object *pl, object *item, const char *msg, object *skill) { - char buf[BOOK_BUF]; + char buf[1024]; object *newBook = NULL; /* a pair of sanity checks */ @@ -1141,7 +1142,7 @@ return strlen(msg); buf[0] = 0; - if(!book_overflow(item->msg,msg,BOOK_BUF)) { /* add msg string to book */ + if(!book_overflow(item->msg,msg,sizeof (buf))) { /* add msg string to book */ if(item->msg) strcpy(buf,item->msg);