Skip to content

Commit

Permalink
[src] Fix bug in decodable-online-looped.cc (prevent crash in nnet3 o…
Browse files Browse the repository at this point in the history
…nline decoding).
  • Loading branch information
danpovey committed Feb 25, 2017
1 parent 089e596 commit 344e1ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nnet3/decodable-online-looped.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void DecodableNnetLoopedOnlineBase::AdvanceChunk() {
int32 num_feature_frames_ready = input_features_->NumFramesReady();
bool is_finished = input_features_->IsLastFrame(num_feature_frames_ready - 1);

if (end_input_frame >= num_feature_frames_ready && !is_finished) {
if (end_input_frame > num_feature_frames_ready && !is_finished) {
// we shouldn't be attempting to read past the end of the available features
// until we have reached the end of the input (i.e. the end-user called
// InputFinished(), announcing that there is no more waveform; at this point
Expand Down

0 comments on commit 344e1ad

Please sign in to comment.