summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-04-09 15:19:31 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-04-09 15:19:31 -0300
commitdc4576d327b6953e38ea21fc9ef0898640d65d99 (patch)
tree94d8b7e453bbc552eb969c9c0d59c82ca1477686 /Settings.c
parentb1f934c5d51532c334bd2fbe513c8e9d10cd8208 (diff)
Fix saving new color scheme.
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Settings.c b/Settings.c
index 6bbfe044..6bd2e12e 100644
--- a/Settings.c
+++ b/Settings.c
@@ -10,6 +10,7 @@ in the source distribution for its full text.
#include "String.h"
#include "Vector.h"
+#include "CRT.h"
#include <sys/stat.h>
#include <stdlib.h>
@@ -208,7 +209,7 @@ static bool Settings_read(Settings* this, const char* fileName, int cpuCount) {
} else if (String_eq(option[0], "color_scheme")) {
this->colorScheme = atoi(option[1]);
if (this->colorScheme < 0) this->colorScheme = 0;
- if (this->colorScheme > 5) this->colorScheme = 5;
+ if (this->colorScheme >= LAST_COLORSCHEME) this->colorScheme = LAST_COLORSCHEME - 1;
} else if (String_eq(option[0], "left_meters")) {
Settings_readMeters(this, option[1], 0);
readMeters = true;

© 2014-2024 Faster IT GmbH | imprint | privacy policy