commit 62ffee45ea763a321606b8ec8fe1bcf0a3791d27
Author:     Mattias Andrée <[email protected]>
AuthorDate: Fri Jul 14 19:59:16 2017 +0200
Commit:     Mattias Andrée <[email protected]>
CommitDate: Fri Jul 14 19:59:16 2017 +0200

    blind-matrix-{rotate,transpose}: fix input check
    
    Signed-off-by: Mattias Andrée <[email protected]>

diff --git a/src/blind-matrix-rotate.c b/src/blind-matrix-rotate.c
index 3e2f5e3..16a0c9f 100644
--- a/src/blind-matrix-rotate.c
+++ b/src/blind-matrix-rotate.c
@@ -59,7 +59,7 @@ main(int argc, char *argv[])
 
        eopen_stream(&stream, NULL);
 
-       if (stream.width != 1 && stream.height != 1)
+       if (stream.width != 1 || stream.height != 1)
                eprintf("<stdin>: each frame must contain exactly 1 pixels\n");
 
        stream.width  = 3;
diff --git a/src/blind-matrix-transpose.c b/src/blind-matrix-transpose.c
index 2103205..5c417db 100644
--- a/src/blind-matrix-transpose.c
+++ b/src/blind-matrix-transpose.c
@@ -56,7 +56,7 @@ main(int argc, char *argv[])
 
        eopen_stream(&stream, NULL);
 
-       if (stream.width != 1 && stream.height != 12)
+       if (stream.width != 1 || stream.height != 1)
                eprintf("<stdin>: each frame must contain exactly 1 pixels\n");
 
        stream.width  = 3;

Reply via email to