Skip to content

Commit 06edcb1

Browse files
authored
🐛 fixes "too many items" when names are null (#543)
* 🐛 avert infinite loop when prod_id not assigned Without ptr being reassigned in the case of a 0 prod_id, the app would get into an infinite loop on launch, before opening- this should resolve it 😊 * 🐛 fixes "too many items" when names are null There is an (honestly misleading) OutOfMemoryException with the message "too many items in listbox" that is thrown when there are any items whose ToString() method returns null. This commit (in my maybe-biased opinion) gives a reasonable output in that case instead.
1 parent aec0e1d commit 06edcb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

BetterJoyForCemu/3rdPartyControllers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public override int GetHashCode() {
4040
}
4141

4242
public override string ToString() {
43-
return name;
43+
return name ?? $"Unidentified Device ({this.product_id})";
4444
}
4545

4646
public string Serialise() {

0 commit comments

Comments
 (0)