projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bec370
)
Fix off-by-one in ASSERT and make it more comprehensive.
author
Carl Hetherington
<cth@carlh.net>
Sun, 26 Jul 2020 00:26:42 +0000
(
02:26
+0200)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 26 Jul 2020 19:30:53 +0000
(21:30 +0200)
src/lib/cinema_sound_processor.cc
patch
|
blob
|
history
diff --git
a/src/lib/cinema_sound_processor.cc
b/src/lib/cinema_sound_processor.cc
index 1a3ba5a0f0af61fcd9b9d412a4b6111e4ffc82ca..bd60f7d710e2acef17813225baa62fe8a09e7d4d 100644
(file)
--- a/
src/lib/cinema_sound_processor.cc
+++ b/
src/lib/cinema_sound_processor.cc
@@
-107,7
+107,7
@@
CinemaSoundProcessor::as_index (CinemaSoundProcessor const * s)
CinemaSoundProcessor const *
CinemaSoundProcessor::from_index (int i)
{
- DCPOMATIC_ASSERT (i
<= int(_cinema_sound_processors.size
()));
+ DCPOMATIC_ASSERT (i
>= 0 && i < int(_cinema_sound_processors.size
()));
return _cinema_sound_processors[i];
}