diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 6129707f1..579a19371 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1416,9 +1416,9 @@ bool Image::Crop( unsigned int lo_x, unsigned int lo_y, unsigned int hi_x, unsig unsigned int new_stride = new_width * colours; for ( unsigned int y = lo_y, ny = 0; y <= hi_y; y++, ny++ ) { - unsigned char *pbuf = &buffer[((y*linesize)+lo_x)]; - unsigned char *pnbuf = &new_buffer[(ny*new_width)*colours]; - memcpy( pnbuf, pbuf, new_stride ); + unsigned char *pbuf = &buffer[((y*linesize)+(lo_x*colours))]; + unsigned char *pnbuf = &new_buffer[ny*new_stride]; + memcpy(pnbuf, pbuf, new_stride); } AssignDirect(new_width, new_height, colours, subpixelorder, new_buffer, new_size, ZM_BUFTYPE_ZM); diff --git a/web/api/app/Plugin/Crud b/web/api/app/Plugin/Crud index 14292374c..0bd63fb46 160000 --- a/web/api/app/Plugin/Crud +++ b/web/api/app/Plugin/Crud @@ -1 +1 @@ -Subproject commit 14292374ccf1328f2d5db20897bd06f99ba4d938 +Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef