We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85432e7 commit 8248adbCopy full SHA for 8248adb
crates/bevy_asset/src/meta.rs
@@ -253,11 +253,11 @@ pub(crate) async fn get_asset_hash(
253
let mut buffer = [0; blake3::CHUNK_LEN];
254
loop {
255
let bytes_read = asset_reader.read(&mut buffer).await?;
256
- if bytes_read == 0 {
257
- // This means we've reached EOF, so we're done consume asset bytes.
+ hasher.update(&buffer[..bytes_read]);
+ if bytes_read < buffer.len() {
258
+ // This means we've reached EOF, so we're done consuming asset bytes.
259
break;
260
}
- hasher.update(&buffer[..bytes_read]);
261
262
Ok(*hasher.finalize().as_bytes())
263
0 commit comments