From 3376ad65688f6c5118edf85f220b0293eadfb894 Mon Sep 17 00:00:00 2001 From: "@clasher113" Date: Tue, 10 Sep 2024 14:35:47 +0300 Subject: [PATCH 1/2] Batch3D::point() check buffer overflow --- src/graphics/core/Batch3D.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graphics/core/Batch3D.cpp b/src/graphics/core/Batch3D.cpp index 82bc3bc3..4f32ae3e 100644 --- a/src/graphics/core/Batch3D.cpp +++ b/src/graphics/core/Batch3D.cpp @@ -246,6 +246,9 @@ void Batch3D::blockCube( } void Batch3D::point(glm::vec3 coord, glm::vec2 uv, glm::vec4 tint) { + if (index + B3D_VERTEX_SIZE >= capacity) { + flush(); + } vertex(coord, uv, tint.r, tint.g, tint.b, tint.a); } From 6139727d6627851410a5d22d12c63120be173a4a Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 10 Sep 2024 14:55:20 +0300 Subject: [PATCH 2/2] update github workflows --- .github/workflows/appimage.yml | 2 +- .github/workflows/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 00b7e0be..a0e6e6fa 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -43,7 +43,7 @@ jobs: UPDATE_INFO: gh-releases-zsync|MihailRis|VoxelEngine-Cpp|latest|*x86_64.AppImage.zsync with: recipe: dev/AppImageBuilder.yml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: AppImage path: './*.AppImage*' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 60ad52a6..f93b5ac9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -43,7 +43,7 @@ jobs: working-directory: ${{ github.workspace }} - name: Run tests run: ctest --output-on-failure --test-dir build - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: Windows-Build path: 'packaged/Release/*'