Is it the integer limit?
integer
-2,147,483,648 .... 2,147,483,647
Level 40
1,216,586,989
and level 41
2,147,483,647
What a coincidence! )))
The hero works fine even with negative experience, which means that for RPG maps and the like, this is an additional advantage, as you don't need mods, scripts, or other serious things to reach level 1 for a long time. :)