The pattern payload protocol framesize is variable and is calculated based on the frameLength and the sum of all protocol frame sizes.
However, when building the frame value, for a calculated size of 0, pattern payload still adds one byte. This is due to this very old code in payload.cpp (not sure why it was added) -
// FIXME: Hack! Bad! Bad! Very Bad!!!
if (dataLen <= 0)
dataLen = 1;