mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-31 08:29:04 -06:00
added error message for file index out of bounds
This commit is contained in:
@@ -85,8 +85,11 @@ namespace openspace {
|
||||
// according to the longest light travel time
|
||||
int lightTimeTravelBuffer = 1;
|
||||
|
||||
if (index == -1 || index >= _dataFiles.size())
|
||||
if (index <= -1 || index >= _dataFiles.size())
|
||||
{
|
||||
LERROR(fmt::format("{}: File index {} is out of bounds.", _loggerCat, index));
|
||||
return;
|
||||
}
|
||||
|
||||
signalData.signals.clear();
|
||||
signalData.signals.reserve(sizeBuffer);
|
||||
|
||||
Reference in New Issue
Block a user