From 01fd4041332a3e56b816fce825f9575bcd573087 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 28 Nov 2017 22:03:51 +0100 Subject: [PATCH] - Fix palette drawer crash --- src/polyrenderer/drawers/screen_triangle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/polyrenderer/drawers/screen_triangle.cpp b/src/polyrenderer/drawers/screen_triangle.cpp index b4d2168ae..7984f2523 100644 --- a/src/polyrenderer/drawers/screen_triangle.cpp +++ b/src/polyrenderer/drawers/screen_triangle.cpp @@ -1463,7 +1463,7 @@ void ScreenTriangle::DrawSpan8(int y, int x0, int x1, const TriDrawTriangleArgs auto colormaps = args->uniforms->BaseColormap(); - const uint32_t *texPixels = (const uint32_t*)args->uniforms->TexturePixels(); + const uint8_t *texPixels = args->uniforms->TexturePixels(); int texWidth = args->uniforms->TextureWidth(); int texHeight = args->uniforms->TextureHeight(); @@ -1476,8 +1476,8 @@ void ScreenTriangle::DrawSpan8(int y, int x0, int x1, const TriDrawTriangleArgs float *zbufferLine = args->zbuffer + args->stencilPitch * 8 * y; - uint32_t *dest = (uint32_t*)args->dest; - uint32_t *destLine = dest + args->pitch * y; + uint8_t *dest = (uint8_t*)args->dest; + uint8_t *destLine = dest + args->pitch * y; int x = x0; while (x < x1)