From 522d6d12fa2bc7595319695da6578cc2cda7fd42 Mon Sep 17 00:00:00 2001 From: RDW Date: Tue, 12 Dec 2023 19:37:45 +0100 Subject: [PATCH] Runtime: Fix a CodeQL warning in the stbi FFI bindings Not that this would ever be a problem in practice, but alas... --- Runtime/Bindings/stbi_ffi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Bindings/stbi_ffi.cpp b/Runtime/Bindings/stbi_ffi.cpp index c82405ca..68c6b46f 100644 --- a/Runtime/Bindings/stbi_ffi.cpp +++ b/Runtime/Bindings/stbi_ffi.cpp @@ -192,7 +192,7 @@ void stbi_abgr_to_rgba(stbi_image_t* image) { if(!image) return; if(!image->data) return; - const size_t num_pixels = image->width * image->height; + const size_t num_pixels = static_cast(image->width) * static_cast(image->height); for(size_t i = 0; i < num_pixels; i++) { uint8_t* pixel = image->data + i * 4; std::swap(pixel[ABGR_ALPHA_INDEX], pixel[ABGR_RED_INDEX]);