summaryrefslogtreecommitdiff
path: root/src/resources/sdlimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/sdlimagehelper.cpp')
-rw-r--r--src/resources/sdlimagehelper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index 337d1cb53..32fbd0f35 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -73,13 +73,13 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
if (pal)
{
for (uint32_t *p_end = pixels + surf->w * surf->h;
- pixels != p_end; ++pixels)
+ pixels != p_end; ++pixels)
{
uint8_t *const p = reinterpret_cast<uint8_t *>(pixels);
const int alpha = *p & 255;
if (!alpha)
continue;
- pal->replaceSColor(p + 1);
+ pal->replaceSColor(p);
}
}
break;
@@ -90,7 +90,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
if (pal)
{
for (uint32_t *p_end = pixels + surf->w * surf->h;
- pixels != p_end; ++pixels)
+ pixels != p_end; ++pixels)
{
pal->replaceAColor(reinterpret_cast<uint8_t *>(pixels));
}
@@ -101,7 +101,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
default:
{
for (uint32_t *p_end = pixels + surf->w * surf->h;
- pixels != p_end; ++pixels)
+ pixels != p_end; ++pixels)
{
const uint32_t p = *pixels;
const int alpha = p & 255;