This only effects DEBUG builds. There is an incorrect Debug check that forces an exit if the spell duration is equal to max. The next line then sets any duration greater than max, to max. It should be <=, not <.
EFFECT.C
EffectAddPlayerEffect
DebugCheck (duration < MAX_EFFECT_DURATION);
// DebugCheck (power < MAX_EFFECT_POWER);
if (duration > MAX_EFFECT_DURATION) duration = MAX_EFFECT_DURATION;
should be
DebugCheck (duration <= MAX_EFFECT_DURATION);
// DebugCheck (power < MAX_EFFECT_POWER);
if (duration > MAX_EFFECT_DURATION) duration = MAX_EFFECT_DURATION;
Was able to cause a crash when modifying duration for certain spells. A check to force duration to stay at max failed the debug check. The biggest offender is Magic map who already stays on for max duration - 1.