Login
User Name:

Password:



Register

Forgot your password?
do_advance
Aug 18, 2026 2:23 am
By physicalcamp
Object Reader for SmaugFUSS Created for 1.9.9
Aug 6, 2026 6:33 am
By Angst
Time spamming LOP1.6
Jun 17, 2026 4:03 pm
By Remcon
A Bash Startup Script
Feb 7, 2026 3:49 pm
By eldhamud
Force Skills
Jan 1, 2026 3:58 pm
By Elwood
SWFotEFUSS 1.5.4
Author: Various
Submitted by: Samson
SWRFUSS 1.4.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.9
Author: Various
Submitted by: Samson
AFKMud 3.0.0
Author: AFKMud Team
Submitted by: Samson
SillyMUD 1.2a
Author: J. Brothers, J. Sievert, et al
Submitted by: Samson
Users Online
Anthropic, Bytespider, Yandex, Baiduspider, Amazonbot, Google

Members: 0
Guests: 38
Stats
Files
Topics
Posts
Members
Newest Member
518
3,814
19,729
590
physicalcamp

» SmaugMuds » Codebases » LoP Codebase » do_advance
Forum Rules | Mark all | Recent Posts

do_advance
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 27, 2026 10:32 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,991
JoinedJul 26, 2005

 
act_wiz.c in function do_advance around line 2949 find
         for( sn = 0; sn <= MAX_SKILL; sn++ )

change that to
         for( sn = 0; sn < MAX_SKILL; sn++ )

Post is unread #2 Aug 18, 2026 2:23 am   
Go to the top of the page
Go to the bottom of the page

physicalcamp
Fledgling
GroupMembers
Posts1
JoinedAug 18, 2026

 
Remcon said:

act_wiz.c in function do_advance around line 2949 find gd
         for( sn = 0; sn <= MAX_SKILL; sn++ )

change that to
         for( sn = 0; sn < MAX_SKILL; sn++ )


Using < MAX_SKILL instead of <= MAX_SKILL should prevent the loop from running one extra iteration when sn reaches the maximum value.

Has this change already been tested in all cases, especially when sn is exactly equal to MAX_SKILL?

Pages:<< prev 1 next >>