fluxmap: Don't push_back() if Fluxmap begins with F_DESYNC.

Fluxmap::split() creates a 0-length Fluxmap if the Fluxmap
begins with F_DESYNC.  Fix this by not doing push_back()
if a F_DESYNC is encountered at the start of the Fluxmap.
This commit is contained in:
Howard M. Harte
2022-02-24 19:07:09 -08:00
parent 8250112c7f
commit 4cbd19d2e5

View File

@@ -99,7 +99,8 @@ std::vector<Fluxmap> Fluxmap::split() {
Fluxmap map;
for (unsigned i=0; i<_bytes.size(); i++) {
if (_bytes[i] == F_DESYNC) {
maps.push_back(map);
if (i > 0)
maps.push_back(map);
map = Fluxmap();
} else {
map.appendByte(_bytes[i]);