diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2025-08-05 21:52:24 +0200 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-08-06 09:16:54 -0600 |
| commit | 0269f1968a026b84e8eca6a360fb4baa4dbeb2a4 (patch) | |
| tree | c184b19ff37dc0e7abb368c7e46d19087a0d3d55 | |
| parent | bfe33e326614a315035067b1eb81dd0a59e67477 (diff) | |
no longer support v142 and update stb image (just in case)
| -rw-r--r-- | .github/workflows/windows_build.yml | 2 | ||||
| -rw-r--r-- | lib/n64graphics/stb_image.h | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 98141b9..0aba7fd 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -11,7 +11,7 @@ jobs: runs-on: windows-2022 strategy: matrix: - toolchain: [v142, v143, clangcl] + toolchain: [v143, clangcl] steps: - uses: actions/checkout@v4 - name: Build diff --git a/lib/n64graphics/stb_image.h b/lib/n64graphics/stb_image.h index 7300952..d4b5c87 100644 --- a/lib/n64graphics/stb_image.h +++ b/lib/n64graphics/stb_image.h @@ -1,4 +1,4 @@ -/* stb_image - v2.29 - public domain image loader - http://nothings.org/stb +/* stb_image - v2.30 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: @@ -48,6 +48,7 @@ LICENSE RECENT REVISION HISTORY: + 2.30 (2024-05-31) avoid erroneous gcc warning 2.29 (2023-05-xx) optimizations 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes @@ -5159,9 +5160,11 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } if (z->depth == 16) { - for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is + for (k = 0; k < s->img_n && k < 3; ++k) // extra loop test to suppress false GCC warning + tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is } else { - for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger + for (k = 0; k < s->img_n && k < 3; ++k) + tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger } } break; |
