Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Brzozowski committed Jul 7, 2018
1 parent 9119065 commit 8f2248e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,10 @@ SDL::SDL_Surface* flipVert(SDL::SDL_Surface* sfc) {
CHECK(result);
std::uint8_t* pixels = (std::uint8_t*) sfc->pixels;
std::uint8_t* rpixels = (std::uint8_t*) result->pixels;
uint pitch = sfc->pitch;
uint pxlength = pitch*sfc->h;
for(uint line = 0; line < sfc->h; ++line) {
uint pos = line * pitch;
std::uint32_t pitch = sfc->pitch;
std::uint32_t pxlength = pitch*sfc->h;
for(auto line = 0; line < sfc->h; ++line) {
std::uint32_t pos = line * pitch;
memcpy(rpixels + pos, pixels + pxlength - pos - pitch, pitch);
}
return result;
Expand Down

0 comments on commit 8f2248e

Please sign in to comment.