projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e559f87
)
Porting: Fix endless loop if image format is not recognized
author
est31
<MTest31@outlook.com>
Wed, 3 Aug 2016 21:20:36 +0000
(23:20 +0200)
committer
est31
<MTest31@outlook.com>
Wed, 3 Aug 2016 21:33:04 +0000
(23:33 +0200)
src/porting.cpp
patch
|
blob
|
history
diff --git
a/src/porting.cpp
b/src/porting.cpp
index 15a18bdfbd9746b8c42db31ffa8f3d04d38bb7d2..acd0472329f12d33fe3ea306e8ecb0b4a2e92660 100644
(file)
--- a/
src/porting.cpp
+++ b/
src/porting.cpp
@@
-619,7
+619,8
@@
bool setXorgWindowIcon(IrrlichtDevice *device,
video::IVideoDriver *v_driver = device->getVideoDriver();
video::IImageLoader *image_loader = NULL;
- for (u32 i = v_driver->getImageLoaderCount() - 1; i >= 0; i--) {
+ u32 cnt = v_driver->getImageLoaderCount();
+ for (u32 i = 0; i < cnt; i++) {
if (v_driver->getImageLoader(i)->isALoadableFileExtension(icon_file.c_str())) {
image_loader = v_driver->getImageLoader(i);
break;