| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,10 @@ | |||
| 1 | 1 | using System; | |
| 2 | 2 | using System.Collections; | |
| 3 | 3 | using System.Collections.Generic; | |
| 4 | + using System.ComponentModel; | ||
| 4 | 5 | using System.Globalization; | |
| 5 | - using System.Reflection; | ||
| 6 | 6 | using System.Runtime.InteropServices; | |
| 7 | 7 | using System.Security; | |
| 8 | - using System.ComponentModel; | ||
| 9 | - using System.Linq.Expressions; | ||
| 10 | 8 | ||
| 11 | 9 | namespace Python.Runtime | |
| 12 | 10 | { | |
@@ -666,6 +664,10 @@ private static bool ToPrimitive(IntPtr value, Type obType, out object result, bo | |||
| 666 | 664 | else | |
| 667 | 665 | { | |
| 668 | 666 | ulong num = Runtime.PyLong_AsUnsignedLong64(op); | |
| 667 | + if (num == ulong.MaxValue && Exceptions.ErrorOccurred()) | ||
| 668 | + { | ||
| 669 | + goto convert_error; | ||
| 670 | + } | ||
| 669 | 671 | try | |
| 670 | 672 | { | |
| 671 | 673 | result = Convert.ToUInt32(num); | |
@@ -692,7 +694,7 @@ private static bool ToPrimitive(IntPtr value, Type obType, out object result, bo | |||
| 692 | 694 | goto convert_error; | |
| 693 | 695 | } | |
| 694 | 696 | } | |
| 695 | - ulong num = Runtime.PyLong_AsUnsignedLongLong(value); | ||
| 697 | + ulong num = Runtime.PyLong_AsUnsignedLongLong(op); | ||
| 696 | 698 | if (num == ulong.MaxValue && Exceptions.ErrorOccurred()) | |
| 697 | 699 | { | |
| 698 | 700 | goto overflow; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments