Double-check that spell.spellName.Length
is 1 and (int)spell.spellName[0]
is 0x30. The debugger display might not show all the characters that are actually in the string.
If the string is from user input it might be a good idea to be prepared for such incorrectly formed input by either catching the exception or using int.TryParse.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…