{ //Overflow check. [Skotlex] unsigned int ratio = skillratio + 100*(8 + st->sp/10); //You'd need something like 6K SP to reach this max, so should be fine for most purposes. if (ratio > 60000) ratio = 60000; //We leave some room here in case skillratio gets further increased. skillratio = (unsigned short)ratio; }