vendor/github.com/pelletier/go-toml/marshal.go
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
--- a/vendor/github.com/pelletier/go-toml/marshal.go	Tue Aug 23 22:33:28 2022 +0200
+++ b/vendor/github.com/pelletier/go-toml/marshal.go	Tue Aug 23 22:39:43 2022 +0200
@@ -1113,7 +1113,7 @@
 				return reflect.ValueOf(nil), fmt.Errorf("Can't convert %v(%T) to %v", tval, tval, mtype.String())
 			}
 
-			if val.Convert(reflect.TypeOf(int(1))).Int() < 0 {
+			if val.Type().Kind() != reflect.Uint64 && val.Convert(reflect.TypeOf(int(1))).Int() < 0 {
 				return reflect.ValueOf(nil), fmt.Errorf("%v(%T) is negative so does not fit in %v", tval, tval, mtype.String())
 			}
 			if reflect.Indirect(reflect.New(mtype)).OverflowUint(val.Convert(reflect.TypeOf(uint64(0))).Uint()) {