mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Still support empty strings
This commit is contained in:
parent
6cdcb89a83
commit
17e83c25c5
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
// Helper function for safe array access
|
||||
static const char* safeArrayAccess(const char* const arr[], size_t arrSize, int idx) {
|
||||
if (idx >= 0 && static_cast<size_t>(idx) < arrSize && arr[idx][0] != '\0') {
|
||||
if (idx >= 0 && static_cast<size_t>(idx) < arrSize) {
|
||||
return arr[idx];
|
||||
}
|
||||
return "Unknown";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue