diff --git a/CImg.h b/CImg.h index 64f76d7f..327e2e00 100644 --- a/CImg.h +++ b/CImg.h @@ -7384,7 +7384,8 @@ namespace cimg_library { return res!=INVALID_FILE_ATTRIBUTES && !(res&FILE_ATTRIBUTE_DIRECTORY); #elif cimg_OS==1 struct stat st_buf; - return (!stat(path,&st_buf) && (S_ISREG(st_buf.st_mode) || S_ISFIFO(st_buf.st_mode) || S_ISCHR(st_buf.st_mode) || S_ISBLK(st_buf.st_mode))); + return (!stat(path,&st_buf) && (S_ISREG(st_buf.st_mode) || S_ISFIFO(st_buf.st_mode) || + S_ISCHR(st_buf.st_mode) || S_ISBLK(st_buf.st_mode))); #else std::FILE *const file = cimg::std_fopen(path,"rb"); if (!file) return false; @@ -22307,7 +22308,7 @@ namespace cimg_library { s1 = ss4; while (s1::vector((ulongT)mp_set,arg2,p2,arg1,p1).move_to(code); @@ -25615,7 +25616,7 @@ namespace cimg_library { const double *ptrs = &_mp_arg(2) + 1; double *ptrd = &_mp_arg(1); CImg ss(sizs + 1); - cimg_for_inX(ss,0,ss.width() - 1,i) ss[i] = (char)ptrs[i]; + cimg_for_inX(ss,0,ss.width() - 2,i) ss[i] = (char)ptrs[i]; ss.back() = 0; if (!sizd) return CImg(w,h,d,s,0).eval(ss,0,0,0,0,&mp.imglist); // Scalar result CImg(++ptrd,w,h,d,s,true) = CImg(w,h,d,s,0).fill(ss,true,true,&mp.imglist); @@ -25876,7 +25877,7 @@ namespace cimg_library { sizd = (unsigned int)mp.opcode[4]; const bool to_string = (bool)mp.opcode[5]; CImg ss(sizs + 1); - cimg_for_inX(ss,0,ss.width() - 1,i) ss[i] = (char)ptrs[i]; + cimg_for_inX(ss,0,ss.width() - 2,i) ss[i] = (char)ptrs[i]; ss.back() = 0; if (sizd) cimg_mp_func_get(ptrd + 1,sizd,to_string,ss._data); else cimg_mp_func_get(ptrd,0,to_string,ss._data); @@ -28108,7 +28109,7 @@ namespace cimg_library { sizs = (unsigned int)mp.opcode[2], sizd = (unsigned int)mp.opcode[4]; CImg sd(sizd + 1); - cimg_for_inX(sd,0,sd.width() - 1,i) sd[i] = (char)ptrd[i]; + cimg_for_inX(sd,0,sd.width() - 2,i) sd[i] = (char)ptrd[i]; sd.back() = 0; if (sizs) cimg_mp_func_set(ptrs + 1,sizs,sd._data); else cimg_mp_func_set(ptrs,0,sd._data); @@ -28408,7 +28409,7 @@ namespace cimg_library { "Specified image dimensions (%d,%d,%d,%d) are invalid.", pixel_type(),w,h,d,s); CImg ss(siz2 + 1); - cimg_for_inX(ss,0,ss.width() - 1,i) ss[i] = (char)ptr2[i]; + cimg_for_inX(ss,0,ss.width() - 2,i) ss[i] = (char)ptr2[i]; ss.back() = 0; if (siz1) cimg_mp_func_store(ptr1 + 1,siz1, (unsigned int)w,(unsigned int)h,(unsigned int)d,(unsigned int)s, @@ -29290,7 +29291,7 @@ namespace cimg_library { static double _mp_vargkth(CImg& vec) { const double val = (+vec).get_shared_points(1,vec.width() - 1). kth_smallest((ulongT)cimg::cut((longT)*vec - 1,(longT)0,(longT)vec.width() - 2)); - cimg_for_inX(vec,1,vec.width()-1,ind) if (vec[ind]==val) return ind - 1.; + cimg_for_inX(vec,1,vec.width() - 1,ind) if (vec[ind]==val) return ind - 1.; return 1.; } diff --git a/html/header.html b/html/header.html index ad966b89..4b86b334 100644 --- a/html/header.html +++ b/html/header.html @@ -23,7 +23,7 @@
Logo

- Latest stable version: 3.3.6        Current pre-release: 3.4.0 (2024/06/09) + Latest stable version: 3.4.0 (2024/06/14)


diff --git a/html/header_doxygen.html b/html/header_doxygen.html index 4dcc432b..0ca7f90b 100644 --- a/html/header_doxygen.html +++ b/html/header_doxygen.html @@ -26,7 +26,7 @@
Logo

- Latest stable version: 3.3.6        Current pre-release: 3.4.0 (2024/06/09) + Latest stable version: 3.4.0 (2024/06/14)