Browse Source

Merge pull request #1245 from BeamNG/fix_glsl_include

Fix GLSL include when file is empty.
Luis Anton Rebollo 10 years ago
parent
commit
68efa70d9c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/gfx/gl/gfxGLShader.cpp

+ 1 - 1
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;
       }