Bugfix: output auto detect: properly detect ambiguous situations (Thanks mist)

fixes #940
This commit is contained in:
Michael Stapelberg 2013-02-04 21:36:55 +01:00
parent a5a43af186
commit 68e447d3f6

View File

@ -139,7 +139,7 @@ char *auto_detect_format(void) {
else if (strcasecmp(name, "xmobar") == 0)
newfmt = "xmobar";
if (newfmt && format) {
if (newfmt && format && strcmp(newfmt, format) != 0) {
fprintf(stderr, "i3status: cannot auto-configure, situation ambiguous (format \"%s\" *and* \"%s\" detected)\n", newfmt, format);
format = NULL;
break;