Skip to content

Commit d7ec0ca

Browse files
authored
Update DirectXTexPNG.cpp
When testing this I found that GetMetadataFromFile wasn't fully initializing the metadata struct.
1 parent 9cf30e2 commit d7ec0ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Auxiliary/DirectXTexPNG.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ namespace
185185
/// @todo More correct DXGI_FORMAT mapping
186186
void GetHeader(TexMetadata& metadata) noexcept(false)
187187
{
188+
metadata = {};
188189
metadata.width = png_get_image_width(st, info);
189190
metadata.height = png_get_image_height(st, info);
190191
metadata.arraySize = 1;

0 commit comments

Comments
 (0)