From d489095bcdf9603053ebd514588093a991605ffb Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 15:37:22 +0000 Subject: More string and fopen safety measures --- nGenEx/D3DXImage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nGenEx/D3DXImage.cpp') diff --git a/nGenEx/D3DXImage.cpp b/nGenEx/D3DXImage.cpp index 3300253..721f0e9 100644 --- a/nGenEx/D3DXImage.cpp +++ b/nGenEx/D3DXImage.cpp @@ -52,7 +52,7 @@ bool D3DXImage::Load(char *filename) bool success = false; FILE* f; - f = fopen(filename,"rb"); + fopen_s(&f, filename,"rb"); if (f == NULL) return success; @@ -162,7 +162,8 @@ bool D3DXImage::Save(char *filename) if (!image || !width || !height) return success; - FILE* f = fopen(filename,"wb"); + FILE* f; + fopen_s(&f, filename,"wb"); if (f == NULL) return success; -- cgit v1.1