core: fix variable substitution for LAYOUT (#778)

This commit is contained in:
Maximilian Seidler 2025-05-19 06:23:50 +00:00 committed by GitHub
parent f7f0c9c6b0
commit da1d076d84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,7 +116,7 @@ static void replaceAllLayout(std::string& str) {
const CVarList LANGS(REPL);
if (LAYOUTIDX >= LANGS.size()) {
Debug::log(ERR, "Layout index {} out of bounds. Max is {}.", LAYOUTIDX, LANGS.size() - 1);
continue;
return;
}
const std::string LANG = LANGS[LAYOUTIDX].empty() ? layoutName : LANGS[LAYOUTIDX] == "!" ? "" : LANGS[LAYOUTIDX];