- refactored all places which treated FileData as zero terminated.

This commit is contained in:
Christoph Oelckers 2023-08-20 01:49:22 +02:00
commit 2c2bf0265f
19 changed files with 63 additions and 47 deletions

View file

@ -28,6 +28,7 @@
#include "hw_shaderpatcher.h"
#include "filesystem.h"
#include "printf.h"
#include "cmdlib.h"
namespace OpenGLRenderer
{
@ -88,7 +89,9 @@ void FShaderProgram::Compile(ShaderType type, const char *lumpName, const char *
{
int lump = fileSystem.CheckNumForFullName(lumpName);
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName);
FString code = fileSystem.ReadFile(lump).GetString();
auto sp = fileSystem.ReadFile(lump);
FString code = GetStringFromLump(lump);
Compile(type, lumpName, code, defines, maxGlslVersion);
}