Skip to content

Commit 3187368

Browse files
authored
Fix out of bounds access leading to crash at spawn (#3535)
More information about the issue at #3534
1 parent f6187f6 commit 3187368

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/plugins/breath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function inject (bot) {
1111
if (bot.entity.id !== packet.entityId) return
1212
for (const metadata of packet.metadata) {
1313
if (metadata.key === 1) {
14-
bot.oxygenLevel = Math.round(packet.metadata[1].value / 15)
14+
bot.oxygenLevel = Math.round(metadata.value / 15)
1515
bot.emit('breath')
1616
}
1717
}

0 commit comments

Comments
 (0)