better fix for is_valid()
[super-star-trek.git] / src / sst.h
index fbaa466f42a05eda0d0dc401d884e1fecf3479a8..f9676f83cb2813eadf7468594a8e6611c69f6fcb 100644 (file)
--- a/src/sst.h
+++ b/src/sst.h
@@ -46,7 +46,7 @@ typedef struct {int x; int y;} coord;
 #define same(c1, c2)           ((c1.x == c2.x) && (c1.y == c2.y))
 #define distance(c1, c2)       sqrt(square(c1.x - c2.x) + square(c1.y - c2.y))
 #define invalidate(w)          w.x = w.y = 0
-#define is_valid(w)            (w.x != 0 || w.y != 0)
+#define is_valid(w)            (w.x != 0 && w.y != 0)
 
 typedef struct {
     coord w;