From 62d96567d4f277538024370034dbaa2b51652604 Mon Sep 17 00:00:00 2001 From: Ryan Schumacher Date: Thu, 7 Nov 2024 15:39:16 -0600 Subject: [PATCH] Lint --- pkg/handlers/tdf.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/handlers/tdf.go b/pkg/handlers/tdf.go index a825d4ab..5634afbd 100644 --- a/pkg/handlers/tdf.go +++ b/pkg/handlers/tdf.go @@ -156,8 +156,9 @@ func (h Handler) InspectTDF(toInspect []byte) (TDFInspect, []error) { r := TDFInspect{ NanoHeader: &header, } - remainder := uint32(len(toInspect)) - size - if remainder < 18 { + remainder := uint32(len(toInspect) - int(size)) + eighteen := uint32(18) // TODO: Rename. Not sure what this value is at present + if remainder < eighteen { return r, []error{ErrTDFInspectFailNotValidTDF} } return r, nil