Skip to content

Commit 0fbaac9

Browse files
authored
whisper : fix index overflow in token-level timestamp logic (#2505)
1 parent a5abfe6 commit 0fbaac9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/whisper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7019,7 +7019,7 @@ static void whisper_exp_compute_token_level_timestamps(
70197019
k++;
70207020
}
70217021
tokens[j].t1 = sample_to_timestamp(k);
7022-
if (j < ns - 1 && tokens[j].t1 > tokens[j + 1].t0) {
7022+
if (j < n - 1 && tokens[j].t1 > tokens[j + 1].t0) {
70237023
tokens[j].t1 = tokens[j + 1].t0;
70247024
} else {
70257025
s1 = k;

0 commit comments

Comments
 (0)