
Pages:<< prev 1 next >>



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
in tables.c you'll find this function. notice the sn <= num_skills in the for loop everywhere else it is just < num_skills.
void remap_slot_numbers( ) { SKILLTYPE *skill; SMAUG_AFF *aff; char tmp[32]; int sn; log_string( "Remapping slots to sns" ); for( sn = 0; sn <= num_skills; ++sn ) { if( ( skill = skill_table[sn] ) != NULL ) { for( aff = skill->first_affect; aff; aff = aff->next ) if( aff->location == APPLY_WEAPONSPELL || aff->location == APPLY_WEARSPELL || aff->location == APPLY_REMOVESPELL || aff->location == APPLY_STRIPSN || aff->location == APPLY_RECURRINGSPELL ) { snprintf( tmp, 32, "%d", slot_lookup( atoi( aff->modifier ) ) ); DISPOSE( aff->modifier ); aff->modifier = str_dup( tmp ); } } } }


Black Hand

GroupAdministrators
Posts3,707
JoinedJan 1, 2002
I wonder what the point of that function even is, but good catch. Once someone managed to hit 500 skills on their MUD it would have gone beyond the end of the array.
FWIW, this was added in Smaug 1.4.
FWIW, this was added in Smaug 1.4.



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
Lol I went and looked at LOP and it had that same issue lol.
Pages:<< prev 1 next >>