From a5e9a71037c9e062153ee67f47e3d220d9dafbd4 Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Sat, 15 Sep 2018 01:12:39 +0200 Subject: [PATCH] Clamp modification values to -50k and 50k --- src/app/components/Modification.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/Modification.jsx b/src/app/components/Modification.jsx index 1fb3581e..2e999c4b 100644 --- a/src/app/components/Modification.jsx +++ b/src/app/components/Modification.jsx @@ -40,6 +40,7 @@ export default class Modification extends TranslatedComponent { */ _updateValue(value) { let { m, name, ship } = this.props; + value = Math.max(Math.min(value, 50000), -50000); ship.setModification(m, name, value, true, true); this.setState({ value }); }