From 5f4d2f3323ca81678fb674d9117c5c78c30f3007 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 9 Aug 2020 12:12:28 -0300 Subject: [PATCH] Fix love.graphics.newVolumeImage when explicit mipmaps are given Fixes issue #1602 --- src/modules/graphics/wrap_Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index a96a26e27..f6596062a 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -954,7 +954,7 @@ int w_newVolumeImage(lua_State *L) for (int slice = 0; slice < slicelen; slice++) { - lua_rawgeti(L, -1, mip + 1); + lua_rawgeti(L, -1, slice + 1); auto data = getImageData(L, -1, true, slice == 0 && mip == 0 ? autodpiscale : nullptr); if (data.first.get())