Commit f4b053b
committed
Fix OverflowException on 64bit due to bad cast
Error message was `OverflowException occurred. Arithmetic operation resulted in an overflow.`
Link below explains in more detail the issue. This fixes the issue in both 32/64bit.
https://www.codeproject.com/Answers/899343/How-to-fix-OverflowException-occurred-Arithmetic-o#answer2
Use keyword `long` instead of `System.Int64`
Cast is safe. Thanks @denfromufa for the sources.
http://stackoverflow.com/a/18173246/2230844
https://msdn.microsoft.com/en-us/library/x65fb868(v=vs.110).aspx1 parent 1d583c7 commit f4b053b
File tree
4 files changed
+5
-5
lines changed- src/runtime
4 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
0 commit comments