ptx: fix panic caused by improper assert (#10916)

* ptx:  fix panic caused by improper assert

* fix formatting
This commit is contained in:
WhateverAWS
2026-06-07 17:02:31 +07:00
committed by GitHub
parent 1cda36fbed
commit 8a107b644b
+1 -1
View File
@@ -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