From 4d04c5513a65dd2b68c411eeb73e4d0893ee47f5 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 13 Dec 2024 13:52:03 -0500 Subject: [PATCH] Fix crash for streaming old states (#44) --- src/LatticesProcessor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LatticesProcessor.cpp b/src/LatticesProcessor.cpp index 731a089..3c21287 100644 --- a/src/LatticesProcessor.cpp +++ b/src/LatticesProcessor.cpp @@ -161,6 +161,8 @@ void LatticesProcessor::setStateInformation(const void *data, int sizeInBytes) originalRefFreq = xmlState->getDoubleAttribute("freq"); maxDistance = xmlState->getIntAttribute("md"); + if (maxDistance < 1) + maxDistance = 24; int tx = xmlState->getIntAttribute("xp"); int ty = xmlState->getIntAttribute("yp");