Skip to content

Commit cdd71af

Browse files
authored
Fix panic in gamepad_viewer example when gamepad is connected (#15854)
# Objective Fixes #15832 ## Solution It seems that this was just a transliteration mistake during #15591. Update the correct text span index. ## Testing I tested on macos with: `cargo run --example gamepad_viewer` - without gamepad connected - with gamepad connected - disconnecting and reconnecting gamepad while running
1 parent 7f24c27 commit cdd71af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/tools/gamepad_viewer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fn update_connected(
465465
.collect::<Vec<_>>()
466466
.join("\n");
467467

468-
*writer.text(query.single(), 2) = if !formatted.is_empty() {
468+
*writer.text(query.single(), 1) = if !formatted.is_empty() {
469469
formatted
470470
} else {
471471
"None".to_string()

0 commit comments

Comments
 (0)