summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 79a7933..700b966 100644
--- a/src/main.c
+++ b/src/main.c
@@ -107,7 +107,6 @@ void channel_fade(int* a, int* b) {
*/
void rgb_fade(int r, int g, int b, int wait) {
int i = 0;
- int highest = 0;
int colors[3] = {r, g, b};
int size = 3;
@@ -133,6 +132,11 @@ int main(int argc, char* argv[]) {
if(argc == 2)
wait = atoi(argv[1]);
+ if(wait < 1) {
+ printf("Error setting wait. Defaulting to 1000\n");
+ wait=1000;
+ }
+
load_current_state(&r, &g, &b);
rgb_fade(r, g, b, wait);
}

Generated by cgit