Commit 8f79186 1 parent 9b4cf59 commit 8f79186 Copy full SHA for 8f79186
File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 30
30
31
31
matrix :
32
32
build_type : [x64-Debug-Linux, x64-Release-Linux]
33
- gcc : [10, 11, 12 ]
33
+ gcc : [12, 13, 14 ]
34
34
35
35
steps :
36
36
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Original file line number Diff line number Diff line change @@ -1679,7 +1679,7 @@ HRESULT DirectX::LoadFromTGAMemory(
1679
1679
1680
1680
const size_t remaining = size - offset - paletteOffset;
1681
1681
if (remaining == 0 )
1682
- return E_FAIL ;
1682
+ return HRESULT_E_HANDLE_EOF ;
1683
1683
1684
1684
const void * pPixels = static_cast <const uint8_t *>(pSource) + offset + paletteOffset;
1685
1685
@@ -2127,6 +2127,12 @@ HRESULT DirectX::LoadFromTGAFile(
2127
2127
image.Release ();
2128
2128
return hr;
2129
2129
}
2130
+
2131
+ if ((remaining - paletteOffset) == 0 )
2132
+ {
2133
+ image.Release ();
2134
+ return HRESULT_E_HANDLE_EOF;
2135
+ }
2130
2136
}
2131
2137
2132
2138
if (convFlags & CONV_FLAGS_RLE)
You can’t perform that action at this time.
0 commit comments