examples/sphere_hunter: use coorect logic for if condition.
authorStefan Schmidt <stefan@osg.samsung.com>
Tue, 20 Oct 2015 14:27:10 +0000 (16:27 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Tue, 20 Oct 2015 14:27:10 +0000 (16:27 +0200)
We want a value here which is between 0 and 10. We need a logical AND here. If
we use OR this condition could never be false.

CID: 1327357

src/examples/sphere_hunter/evas_3d_sphere_hunter.c

index 4fef49bd950ccf4790d2d65e7afd42826456fa7b..895d4f1de75046fb907b13361776f7b81560a028 100644 (file)
@@ -707,7 +707,7 @@ char score_buffer[32];
 static char *
 _score_get(int sc)
 {
-   if (sc >= 0 || sc <= 10)
+   if (sc >= 0 && sc <= 10)
      {
         eina_convert_itoa(sc, score_buffer);
         return score_buffer;