mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix a crash when Canvas:newImageData is called and the width multiplied by the canvas format's pixel byte size is not a multiple of 4, for example a 3x3 r16f canvas (thanks Max!)
This commit is contained in:
@@ -191,6 +191,7 @@ bool Graphics::setMode(int width, int height, int pixelwidth, int pixelheight, b
|
||||
|
||||
// Set pixel row alignment
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
|
||||
// Always enable seamless cubemap filtering when possible.
|
||||
if (GLAD_VERSION_3_2 || GLAD_ARB_seamless_cube_map)
|
||||
|
||||
Reference in New Issue
Block a user