summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/schiffbruch-fix-build-for-gcc-13.patch
blob: 0cc87b2a9073134a1d186f3b43bed192a80cbc91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Submitted as pull request <https://github.com/sandsmark/Schiffbruch/pull/1>.

From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Wed, 24 Sep 2025 10:24:24 +0200
Subject: [PATCH] fix build for gcc 13

---
 src/Renderer.cpp | 3 ++-
 src/types.hpp    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Renderer.cpp b/src/Renderer.cpp
index d3339e2..93d472c 100644
--- a/src/Renderer.cpp
+++ b/src/Renderer.cpp
@@ -202,6 +202,8 @@ RGBSTRUCT GetPixel(short x, short y, sf::Image *img)
 //    DWORD pitch = ddsd->lPitch >> 1;
 //    DWORD color = pixels[y * pitch + x * 2];
 
+    RGBSTRUCT rgbStruct;
+
     // TODO: more efficient
     if (x < 0 || y < 0 || x >= int(img->getSize().x) || y >= int(img->getSize().y)) {
         rgbStruct.r = 0;
diff --git a/src/types.hpp b/src/types.hpp
index 2034966..fd1882d 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -3,6 +3,7 @@
 #include "headers.hpp"
 //#include "miniwin.h"
 
+#include <cstdint>
 #include <SFML/Graphics/Texture.hpp>
 
 namespace Action {
-- 
2.51.0