Skip to content

Commit

Permalink
Fix out of bounds access leading to crash at spawn (#3535)
Browse files Browse the repository at this point in the history
More information about the issue at #3534
  • Loading branch information
wAIfu-DEV authored Jan 1, 2025
1 parent f6187f6 commit 3187368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/breath.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function inject (bot) {
if (bot.entity.id !== packet.entityId) return
for (const metadata of packet.metadata) {
if (metadata.key === 1) {
bot.oxygenLevel = Math.round(packet.metadata[1].value / 15)
bot.oxygenLevel = Math.round(metadata.value / 15)
bot.emit('breath')
}
}
Expand Down

0 comments on commit 3187368

Please sign in to comment.