mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Fixed epic bug in runtime.cpp causing non-Lua-owned objects to be released by Lua GC.
This commit is contained in:
@@ -171,6 +171,7 @@ namespace devil
|
||||
ILuint h = d->getHeight();
|
||||
int headerLen, bpp;
|
||||
switch (f) {
|
||||
case Image::FORMAT_TGA: // MSVC issues warning when there's no case statement.
|
||||
default: // since we only support one format
|
||||
headerLen = 18;
|
||||
bpp = 3;
|
||||
@@ -202,7 +203,7 @@ namespace devil
|
||||
ILubyte * temp = new ILubyte[row];
|
||||
ILubyte * src = data - row;
|
||||
ILubyte * dst = data + size;
|
||||
for (int i = 0; i < (h >> 1); i++) {
|
||||
for (unsigned i = 0; i < (h >> 1); i++) {
|
||||
memcpy(temp,src+=row,row);
|
||||
memcpy(src,dst-=row,row);
|
||||
memcpy(dst,temp,row);
|
||||
|
||||
Reference in New Issue
Block a user