fix(env): filter all ASCII control characters from leading args

The check for unprintable leading arguments added by firmware used
c < 0x1f, which missed 0x1f itself. Use is_ascii_control() instead.
This commit is contained in:
alex authored and Alex Zenla committed 2026-09-26 18:58:54 -07:00
1 parent f7e7a9122b
commit 5c2724fd22
1 file changed
+1 -1
+1 -1
View File
@@ -52,7 +52,7 @@ pub fn args() -> Result<Vec<String>> {
.next()
// Filter out unprintable characters and backticks.
// Both of which have been observed in the wild.
.map(|c| c < 0x1f as char || c == '`')
.map(|c| c.is_ascii_control() || c == '`')
.unwrap_or(false)
})
.collect();