Parcourir la source

multi_button.c: add the default keyword for the switch case

https://github.com/0x1abin/MultiButton/commit/98d1643e5b919d267a2b40955a309be410bef2c6
Meco Man il y a 2 ans
Parent
commit
cf3a197ecd
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      multi_button.c

+ 4 - 0
multi_button.c

@@ -192,6 +192,10 @@ void button_handler(struct button* handle)
             handle->state = 0;
             handle->state = 0;
         }
         }
         break;
         break;
+
+    default:
+        handle->state = 0; /* reset */
+        break;
     }
     }
 }
 }