We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f6aab2 commit 8fe4c66Copy full SHA for 8fe4c66
src/osd.cpp
@@ -849,7 +849,6 @@ class TplTextWidget: public Widget {
849
uint precision = default_precision;
850
int fact_i = 0;
851
std::ostringstream msg;
852
- std::string precision_str;
853
for(char& c : tpl) {
854
if (c == '%') {
855
at_placeholder = true;
@@ -868,7 +867,12 @@ class TplTextWidget: public Widget {
868
867
msg << '?'; // Handle out-of-bounds fact access
869
break;
870
}
871
- const Fact& fact = args[fact_i];
+ const Fact& fact = args.at(fact_i);
+ if (!fact.isDefined()) {
872
+ msg << '?';
873
+ fact_i++;
874
+ continue;
875
+ }
876
switch (c) {
877
case 'b':
878
msg << (fact.getBoolValue() ? 't' : 'f');
0 commit comments