1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-05 07:27:46 +00:00

Fix is_signal

This commit is contained in:
Zachary Dremann 2019-04-29 21:35:07 -04:00 committed by Roy Ivy III
parent 44550ee5b6
commit 30df2210f0

View file

@ -341,7 +341,8 @@ pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
#[inline(always)]
pub fn is_signal(num: usize) -> bool {
num < ALL_SIGNALS.len()
// Named signals start at 1
num <= ALL_SIGNALS.len()
}
#[test]