Browse Source

Fix GLSL include when file is empty.

LuisAntonRebollo 10 years ago
parent
commit
e6b7cf108b
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);
          dFree(includedText);
          manip.insert(q-buffer, sItx);
          manip.insert(q-buffer, sItx);
          char* manipBuf = dStrdup(manip.c_str());
          char* manipBuf = dStrdup(manip.c_str());
-         p = manipBuf + (p - buffer);
+         p = manipBuf + (q - buffer);
          dFree(buffer);
          dFree(buffer);
          buffer = manipBuf;
          buffer = manipBuf;
       }
       }