Skip to content

Commit

Permalink
sdl: fix pallete conversion buffer allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Jul 1, 2023
1 parent 7bdd9dc commit f15cd38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 32blit-sdl/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void System::update_texture(SDL_Texture *texture) {
auto stride = (is_lores ? width / 2 : width) * blit::pixel_format_stride[int(cur_format)];

if(cur_format == blit::PixelFormat::P) {
uint8_t col_fb[width * height * 3];
uint8_t col_fb[max_width * max_height * 3];

auto in = framebuffer, out = col_fb;
auto size = is_lores ? (width / 2) * (height / 2) : width * height;
Expand Down

0 comments on commit f15cd38

Please sign in to comment.