diff --git a/pxr/imaging/hdSt/testenv/testHdStTextureHandleRegistry.cpp b/pxr/imaging/hdSt/testenv/testHdStTextureHandleRegistry.cpp index 7587051a97..4a8848825c 100644 --- a/pxr/imaging/hdSt/testenv/testHdStTextureHandleRegistry.cpp +++ b/pxr/imaging/hdSt/testenv/testHdStTextureHandleRegistry.cpp @@ -349,8 +349,9 @@ My_TestGLDrawing::OffscreenTest() { TfDeleteFile("reloadingTexture.png"); - std::ifstream src("reloadingTexture2.png"); - std::ofstream dst("reloadingTexture.png"); + constexpr auto mode = std::ios_base::binary; + std::ifstream src{"reloadingTexture2.png", mode}; + std::ofstream dst{"reloadingTexture.png", mode}; dst << src.rdbuf(); }