This commit is contained in:
conrad
2021-03-30 17:09:59 +10:00
parent c4b83ca819
commit a48c8a3418
+2 -2
View File
@@ -4770,7 +4770,7 @@ diskio::load_ppm_binary(Cube<eT>& x, std::istream& f, std::string& err_msg)
f >> f_maxval;
f.get();
if( (f_maxval > 0) || (f_maxval <= 65535) )
if( (f_maxval > 0) && (f_maxval <= 65535) )
{
x.set_size(f_n_rows, f_n_cols, 3);
@@ -4959,7 +4959,7 @@ diskio::load_ppm_binary(field<T1>& x, std::istream& f, std::string& err_msg)
f >> f_maxval;
f.get();
if( (f_maxval > 0) || (f_maxval <= 65535) )
if( (f_maxval > 0) && (f_maxval <= 65535) )
{
x.set_size(3);
Mat<eT>& R = x(0);