File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1121,7 +1121,7 @@ func (maybeSelf someDef[T]) ToUintptr() (uintptr, error) {
11211121 return uintptr (0 ), ErrConversionUnsupported
11221122 case string :
11231123 parseInt , err := strconv .ParseInt ((ref ).(string ), 10 , 64 )
1124- if uint64 (parseInt ) < maxUintptr {
1124+ if uint64 (parseInt ) <= maxUintptr {
11251125 return uintptr (parseInt ), err
11261126 }
11271127 return uintptr (0 ), ErrConversionSizeOverflow
@@ -1142,7 +1142,7 @@ func (maybeSelf someDef[T]) ToUintptr() (uintptr, error) {
11421142 return uintptr (val ), err
11431143 case uint64 :
11441144 val , err := maybeSelf .ToUint64 ()
1145- if val < maxUintptr {
1145+ if val <= maxUintptr {
11461146 return uintptr (val ), err
11471147 }
11481148 return uintptr (0 ), ErrConversionSizeOverflow
@@ -1165,7 +1165,7 @@ func (maybeSelf someDef[T]) ToUintptr() (uintptr, error) {
11651165 return uintptr (val ), err
11661166 case int64 :
11671167 val , err := maybeSelf .ToInt64 ()
1168- if uint64 (val ) < maxUintptr {
1168+ if uint64 (val ) <= maxUintptr {
11691169 return uintptr (val ), err
11701170 }
11711171 return uintptr (0 ), ErrConversionSizeOverflow
You can’t perform that action at this time.
0 commit comments