From b04d6a2d9b68edf6f8935927f5321eab7936db29 Mon Sep 17 00:00:00 2001 From: Alex Kalmuk Date: Tue, 27 Apr 2021 11:06:10 +0300 Subject: [PATCH] Fix squares sample failure when a single file passed --- samples/cpp/squares.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/squares.cpp b/samples/cpp/squares.cpp index 042a716f90..2ea824decd 100644 --- a/samples/cpp/squares.cpp +++ b/samples/cpp/squares.cpp @@ -123,14 +123,14 @@ static void findSquares( const Mat& image, vector >& squares ) int main(int argc, char** argv) { - static const char* names[] = { "pic1.png", "pic2.png", "pic3.png", + const char* names[] = { "pic1.png", "pic2.png", "pic3.png", "pic4.png", "pic5.png", "pic6.png", 0 }; help(argv[0]); if( argc > 1) { names[0] = argv[1]; - names[1] = "0"; + names[1] = 0; } for( int i = 0; names[i] != 0; i++ ) -- 2.34.1