From e6b7cf108bfc35c9771efd112fde24d8a05fe35f Mon Sep 17 00:00:00 2001 From: LuisAntonRebollo Date: Sun, 8 Mar 2015 23:25:23 +0100 Subject: [PATCH] Fix GLSL include when file is empty. --- Engine/source/gfx/gl/gfxGLShader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/gfx/gl/gfxGLShader.cpp b/Engine/source/gfx/gl/gfxGLShader.cpp index 001836158..f10a2dd3f 100644 --- a/Engine/source/gfx/gl/gfxGLShader.cpp +++ b/Engine/source/gfx/gl/gfxGLShader.cpp @@ -929,7 +929,7 @@ char* GFXGLShader::_handleIncludes( const Torque::Path& path, FileStream *s ) dFree(includedText); manip.insert(q-buffer, sItx); char* manipBuf = dStrdup(manip.c_str()); - p = manipBuf + (p - buffer); + p = manipBuf + (q - buffer); dFree(buffer); buffer = manipBuf; }