Arithmetic operation resulted in an overflow. (Adding integers)

前端 未结 8 1695
既然无缘
既然无缘 2020-12-20 11:16

I can\'t understand this error:

In this call to method SetVolume, Volume = 2055786000 and size = 93552000. Volume is an Integer pr

8条回答
  •  一生所求
    2020-12-20 11:47

    2055786000 + 93552000 = 2149338000, which is greater than 2^31. So if you're using signed integers coded on 4 bytes, the result of the operation doesn't fit and you get an overflow exception.

提交回复
热议问题