Skip to content

Commit

Permalink
Update de.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 authored Jan 26, 2025
1 parent 39d86af commit e68edfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ where
// check JSON size, because the design of `sonic_rs::Value`, parsing JSON larger than 4 GB is
// not supported
let len = read.as_u8_slice().len();
if len >= (u32::MAX / 2) as _ {
if len > u32::MAX as _ {
return Err(crate::error::make_error(format!(
"Only support JSON less than 4 GB, the input JSON is too large here, len is {len}"
)));
Expand Down

0 comments on commit e68edfc

Please sign in to comment.