diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index ed78f9a67c0..0e2b98a91dd 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -207,7 +207,7 @@ void VirtualKeyboard::switchMode(Mode *newMode) { _currentMode = newMode; } -void VirtualKeyboard::switchMode(const String& newMode) { +void VirtualKeyboard::switchMode(const String &newMode) { if (!_modes.contains(newMode)) { warning("Keyboard mode '%s' unknown", newMode.c_str()); } else { diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp index aee44666f36..1c652fa19da 100644 --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -247,10 +247,12 @@ bool XMLParser::closeKey() { } bool XMLParser::parse() { - if (_stream == 0) return parserError("XML stream not ready for reading."); + // Make sure we are at the start of the stream. + _stream->seek(0, SEEK_SET); + if (_XMLkeys == 0) buildLayout();