NDEF: fix parsing of empty chunks


The PAYLOAD_LENGTH of *any* record can be 0. That also includes the
chunked payloads.

The previous algorithm simply skipped the payload accumulation logic
when the payloadLenght was 0. That mostly worked fine, except of the
case of the last chunk in the chunked payload. It was also skipped,
and as a result the temporary partialChunk byte array was never copied
into the record's payload. This resulted in misinterpreted messages.

Fix by always applying the payload accumulation logic, even when the
payload is empty.

Task-number: QTBUG-151318
Pick-to: 6.12 6.8
Change-Id: If9d078b37793d8406ff1f738430c2bd6ad2065dc
Reviewed-by: Mate Barany <mate.barany@qt.io>
commit6b02339742b06e0dd93e22c1b7073ce030fdb99c
parent05a16fe103624202d2b0ed37fe1a894f672c5afb
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeTue, 13 Oct 2026 06:19:52 +0000