From 5dcfd505c337e8af430a268ed8666e9928d2611f Mon Sep 17 00:00:00 2001 From: s1lentq Date: Fri, 4 Dec 2015 22:23:05 +0600 Subject: [PATCH] Fix: skip bytes BOM signature in SV_CreateGenericResources --- rehlds/engine/sv_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 87ea03e..cf87ebb 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -4945,7 +4945,12 @@ void SV_CreateGenericResources(void) if (buffer == NULL) return; - data = buffer; + // skip bytes BOM signature + if ((byte)buffer[0] == 0xEFu && (byte)buffer[1] == 0xBBu && (byte)buffer[2] == 0xBFu) + data = &buffer[3]; + else + data = buffer; + Con_DPrintf("Precaching from %s\n", filename); Con_DPrintf("----------------------------------\n"); g_psv.num_generic_names = 0;