reverse evaluation order so SetFormatting() won't be invoked if findme is empty

This commit is contained in:
Andrzej Rybczak
2009-09-16 22:25:40 +00:00
parent 6723808c4f
commit ff84ba8d9d

View File

@@ -1724,7 +1724,7 @@ int main(int argc, char *argv[])
ShowMessage("Searching...");
Screen<Scrollpad> *s = static_cast<Screen<Scrollpad> *>(myScreen);
s->Main()->RemoveFormatting();
ShowMessage("%s", s->Main()->SetFormatting(fmtReverse, TO_WSTRING(findme), fmtReverseEnd) || findme.empty() ? "Done!" : "No matching patterns found");
ShowMessage("%s", findme.empty() || s->Main()->SetFormatting(fmtReverse, TO_WSTRING(findme), fmtReverseEnd) ? "Done!" : "No matching patterns found");
s->Main()->Flush();
}
}