From: Pawel Date: Tue, 10 Dec 2013 09:26:10 +0000 (+0100) Subject: 0024451: Logical conjunction always evaluates to false X-Git-Tag: V6_7_0~12 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=de88958f6ef2efb51bf2516a3f6aa3b32bfb21df;p=occt-copy.git 0024451: Logical conjunction always evaluates to false As the variable gets casted on Standard_Byte it is checked to be within the range <0; 255> --- diff --git a/src/DDataStd/DDataStd_BasicCommands.cxx b/src/DDataStd/DDataStd_BasicCommands.cxx index 7159e5c4b3..ca08e3fa11 100755 --- a/src/DDataStd/DDataStd_BasicCommands.cxx +++ b/src/DDataStd/DDataStd_BasicCommands.cxx @@ -1153,7 +1153,7 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di, j = 6; for(Standard_Integer i = From; i<=To; ++i) { Standard_Integer ival = Draw::Atoi(arg[j]); - if(ival < 0 && 255 < ival) { + if(ival < 0 || 255 < ival) { cout << "Bad value = " << ival<< endl; return 1; }