From ff1bb8944903ece6663af4c5b3447e84dfde86e5 Mon Sep 17 00:00:00 2001 From: landrigun Date: Wed, 8 Jan 2025 10:32:22 +0000 Subject: [PATCH] fix int overflow --- forms/forms.go | 2 +- services/store.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forms/forms.go b/forms/forms.go index 9a27f32..ba6773b 100644 --- a/forms/forms.go +++ b/forms/forms.go @@ -185,7 +185,7 @@ func (uf *UploadForm) IntoResource() *services.Resource { Name: uf.Name.Value, Editor: uf.Editor.Value, Authors: uf.Authors.Value, - Year: uint16(uf.Year.Value), + Year: uf.Year.Value, Keywords: nil, Content: bytes.NewBuffer(uf.File.Value.content), } diff --git a/services/store.go b/services/store.go index 6ad1f17..b25d177 100644 --- a/services/store.go +++ b/services/store.go @@ -80,7 +80,7 @@ type Resource struct { Description *string Editor string Authors []string - Year uint16 + Year int Keywords []string Content *bytes.Buffer Path string