diff options
| author | Fuwn <[email protected]> | 2026-04-18 01:01:41 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-18 01:05:13 +0000 |
| commit | 53fac17bbcaa2957235b54b6e24e835cabca2033 (patch) | |
| tree | c15f761fb4faeb9cfad7716ec76eea6f7059f7ec /src/request.gleam | |
| parent | refactor: Tighten dead branches and fail fast on missing index.html (diff) | |
| download | mayu-53fac17bbcaa2957235b54b6e24e835cabca2033.tar.xz mayu-53fac17bbcaa2957235b54b6e24e835cabca2033.zip | |
fix: Harden startup + SVG input handling
Diffstat (limited to 'src/request.gleam')
| -rw-r--r-- | src/request.gleam | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/request.gleam b/src/request.gleam index 82048af..a56780b 100644 --- a/src/request.gleam +++ b/src/request.gleam @@ -45,7 +45,7 @@ pub fn handle(request, connection, image_cache, index_html) { case list.key_find(query, "padding") { Ok(padding) -> case int.parse(padding) { - Ok(n) -> n + Ok(n) -> int.clamp(n, min: 0, max: 32) Error(_) -> 6 } _ -> 6 |