From bda6dd4337dcf219f74c1130166b2188b9f4f62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Fern=C3=A1ndez=20Serrata?= <76864299+Rudxain@users.noreply.github.com> Date: Sun, 1 Dec 2024 00:44:58 -0400 Subject: [PATCH] warn about unsafe arithmetic --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.js b/src/main.js index c0b1ce6..12ffd38 100644 --- a/src/main.js +++ b/src/main.js @@ -209,6 +209,8 @@ const RGBDR_anim = (() => { // don't do this at home, kids! const y = this.#y += n if (is_inf_nan(y)) + // WARN: if a `try` `catch`es this, + // the invariant will be broken! throw new RangeError(`${y}`) return y }