From f8cc5effe260cd84b819428ecf958ac13c4c76d8 Mon Sep 17 00:00:00 2001 From: jbikker Date: Sat, 9 Nov 2024 16:39:34 +0100 Subject: [PATCH] Using fopen_s now. --- tiny_bvh_fenster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiny_bvh_fenster.cpp b/tiny_bvh_fenster.cpp index a1140bc..a5f49c1 100644 --- a/tiny_bvh_fenster.cpp +++ b/tiny_bvh_fenster.cpp @@ -58,7 +58,8 @@ void Init() { #ifdef LOADSPONZA // load raw vertex data for Crytek's Sponza - FILE* f = fopen( "../testdata/cryteksponza.bin", "rb" ); + FILE* f; + fopen_s( &f, "../testdata/cryteksponza.bin", "rb" ); fread( &verts, 1, 4, f ); verts *= 3, triangles = new bvhvec4[verts]; fread( triangles, sizeof( bvhvec4 ), verts, f );