From cf58fa375c003173215baf81b4b64cf4e5c1873c Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 23 Mar 2022 11:22:31 +0100 Subject: Fix FIG0/13 length calculation --- src/fig/FIG0_13.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fig/FIG0_13.cpp b/src/fig/FIG0_13.cpp index d1d18c7..4233302 100644 --- a/src/fig/FIG0_13.cpp +++ b/src/fig/FIG0_13.cpp @@ -120,7 +120,10 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size) required_size += sizeof(FIG0_13_app) + xpaddata_length; if (ua.uaType == FIG0_13_APPTYPE_SPI) { - required_size += 2; // For the "basic profile" user application data + required_size += 1; + } + else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE) { + required_size += 2; } } -- cgit v1.2.3