diff options
author | aap <aap@papnet.eu> | 2020-12-30 15:08:10 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-30 15:08:10 +0100 |
commit | 77884e0a5784cca2ce057453b34c0b0879c7144b (patch) | |
tree | f48db646d637e1c0e37ed977934b817ee5320563 /src/extras | |
parent | fix custom pipes mem leak (diff) | |
download | re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar.gz re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar.bz2 re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar.lz re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar.xz re3-77884e0a5784cca2ce057453b34c0b0879c7144b.tar.zst re3-77884e0a5784cca2ce057453b34c0b0879c7144b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/extras/custompipes_d3d9.cpp | 6 | ||||
-rw-r--r-- | src/extras/custompipes_gl.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index e670fc93..63ca5f28 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -139,7 +139,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) void CreateVehiclePipe(void) { - if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); else{ char *fp = (char*)work_buff; @@ -254,7 +254,7 @@ worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) void CreateWorldPipe(void) { - if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); else ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); @@ -500,7 +500,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) void CreateRimLightPipes(void) { - if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/rimTweakingTable.dat'\n"); else{ char *fp = (char*)work_buff; diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index 861a831e..a7267fc6 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -147,7 +147,7 @@ CreateVehiclePipe(void) using namespace rw; using namespace rw::gl3; - if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); else{ char *fp = (char*)work_buff; @@ -264,7 +264,7 @@ CreateWorldPipe(void) using namespace rw; using namespace rw::gl3; - if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); else ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); @@ -533,7 +533,7 @@ CreateRimLightPipes(void) { using namespace rw::gl3; - if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0) + if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) printf("Error: couldn't open 'neo/rimTweakingTable.dat'\n"); else{ char *fp = (char*)work_buff; |