From b8d7a2204377c5ec48b2a3cfe0d6e8aabfe5ca2d Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Sun, 7 Feb 2016 04:05:45 +0300 Subject: [PATCH] Added resource resetting (fixed bug with unitialized fields in resource_t) --- rehlds/engine/sv_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 2d7197a..6e26bf3 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -5004,6 +5004,8 @@ void EXT_FUNC SV_AddResource(resourcetype_t type, const char *name, int size, un #ifdef REHLDS_FIXES r = &g_rehlds_sv.resources[g_psv.num_resources++]; + + Q_memset(r, 0, sizeof(*r)); #else // REHLDS_FIXES r = &g_psv.resourcelist[g_psv.num_resources++]; #endif