Reset invalid log-reading position.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-03-25 11:11:36 -05:00
parent bc24308fa1
commit 66dcd7cb00

View File

@ -43,6 +43,9 @@ fn read_log(
log: Query<&Log, Changed<Log>>,
) -> Result<(), Box<dyn Error>> {
for log in log.iter() {
if *position >= log.len() {
*position = 0;
}
for (index, entry) in log.iter().enumerate() {
if index >= *position {
tts.speak(entry.message.clone(), false)?;