shithub: cstory

Download patch

ref: 6c1eb23fe100299194b9921f15af3f6594a7e260
parent: f1fd371db7347cc48eb7ae6f449ff9742a6feea5
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Nov 3 15:22:51 EST 2020

Simplify some pointer logic

--- a/src/Backends/Rendering/SDLTexture.cpp
+++ b/src/Backends/Rendering/SDLTexture.cpp
@@ -240,12 +240,11 @@
 	}
 
 	const unsigned char *src_pixel = pixels;
+	unsigned char *buffer_pointer = buffer;
 
 	// Convert the colour-keyed pixels to RGBA32
 	for (size_t y = 0; y < height; ++y)
 	{
-		unsigned char *buffer_pointer = &buffer[y * width * 4];
-
 		for (size_t x = 0; x < width; ++x)
 		{
 			*buffer_pointer++ = src_pixel[0];