Browse Source

Fix love.graphics.newVolumeImage when explicit mipmaps are given

Fixes issue #1602
Alex Szpakowski 5 years ago
parent
commit
5f4d2f3323
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/wrap_Graphics.cpp

+ 1 - 1
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())