diff options
| -rw-r--r-- | common/rawaccel-validate.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp index e9d1120..e776298 100644 --- a/common/rawaccel-validate.hpp +++ b/common/rawaccel-validate.hpp @@ -82,10 +82,16 @@ namespace rawaccel { if (args.offset < 0) { error("offset can not be negative"); } + else if (args.mode == accel_mode::jump && args.offset == 0) { + error("offset can not be 0"); + } if (args.cap < 0) { error("cap"" must not be negative"); } + else if (args.mode == accel_mode::jump && args.cap == 0) { + error("cap can not be 0"); + } if (args.growth_rate <= 0 || args.decay_rate <= 0 || |