summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/SoundD3D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nGenEx/SoundD3D.cpp')
-rw-r--r--nGenEx/SoundD3D.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/nGenEx/SoundD3D.cpp b/nGenEx/SoundD3D.cpp
index fb4000e..45c5c0d 100644
--- a/nGenEx/SoundD3D.cpp
+++ b/nGenEx/SoundD3D.cpp
@@ -835,8 +835,10 @@ SoundD3D::StreamFile(const char* name, DWORD offset)
min_safety = safety_zone;
read_size = buf_size;
+ fopen_s(&stream, name, "rb");
+
// open the stream:
- if ((stream = fopen(name, "rb")) == 0) {
+ if (stream == 0) {
SoundD3DError("StreamFile: could not open stream", E_FAIL);
return E_FAIL;
}