This commit is contained in:
conrad
2021-03-30 17:20:32 +10:00
parent 990654a040
commit a7408c2d59
+2 -2
View File
@@ -4377,7 +4377,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);
@@ -4566,7 +4566,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);