Make sure strncpy always keeps one byte untouched for NUL
[neverball] / ball / game_common.h
index ca21fe9..ac502a2 100644 (file)
 
 /*---------------------------------------------------------------------------*/
 
-#define GAME_NONE 0
-#define GAME_TIME 1
-#define GAME_GOAL 2
-#define GAME_FALL 3
+enum
+{
+    GAME_NONE = 0,
+
+    GAME_TIME,
+    GAME_GOAL,
+    GAME_FALL,
+
+    GAME_MAX
+};
 
 const char *status_to_str(int);