Ideally, the code should be fixed to return the proper signed number. There are a few places where the perl return value and the actual value the server is using don't agree either in sign or size. If you do want to clamp/ignore it, any value over 32767 would have been negative.
Does the AC show negative in the stats page on the client or is it capped at 0?
I'm guessing this code from Client::CalcAC() is the issue:
if (m_pp.class_ == WIZARD || m_pp.class_ == MAGICIAN || m_pp.class_ == NECROMANCER || m_pp.class_ == ENCHANTER) {
//something is wrong with this, naked casters have the wrong natural AC
// mitigation = (spellbonuses.AC/3) + (GetSkill(DEFENSE)/2) + (itembonuses.AC+1);
mitigation = (GetSkill(DEFENSE) + itembonuses.HeroicAGI/10)/4 + (itembonuses.AC+1);
//this might be off by 4..
mitigation -= 4;
Based on the comments, it looks like it's known the math is a bit dodgy. On a completely nude brand new caster I'd guess they have a defense skill of 1, so:
(1+0/10)/4 + 1 - 4, or simplified as (1-4) = -3.
Since the server uses the real value in any calculation, and once they put on any piece of armor with AC and/or raise their defense skill it's probably not an issue as far as indestructible level 1 wizard is concerned. It is funny though.