From 8a107b644b97ebf943eab0c2307b622848b3eb2c Mon Sep 17 00:00:00 2001 From: WhateverAWS <151141957+WhateverAWS@users.noreply.github.com> Date: Sun, 7 Jun 2026 17:02:31 +0700 Subject: [PATCH] ptx: fix panic caused by improper assert (#10916) * ptx: fix panic caused by improper assert * fix formatting --- src/uu/ptx/src/ptx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index 64a5e2bac..28d5e880a 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -501,7 +501,7 @@ fn get_output_chunks( // and get the string. let before_str: String = all_before[before_beg..before_end].iter().collect(); before.push_str(&before_str); - assert!(max_before_size >= before.len()); + assert!(max_before_size >= before.chars().count()); // the after chunk