Fix glGetShaderSource conformance

TRAC #11718 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@92 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 376e1064
......@@ -148,7 +148,7 @@ void Shader::getSource(GLsizei bufSize, GLsizei *length, char *source)
if (mSource)
{
while (index < bufSize - 1 && index < (int)strlen(mInfoLog))
while (index < bufSize - 1 && index < (int)strlen(mSource))
{
source[index] = mSource[index];
index++;
......
......@@ -2171,7 +2171,7 @@ void __stdcall glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length
if (!shaderObject)
{
return error(GL_INVALID_VALUE);
return error(GL_INVALID_OPERATION);
}
shaderObject->getSource(bufsize, length, source);
......@@ -2916,7 +2916,7 @@ void __stdcall glShaderSource(GLuint shader, GLsizei count, const char** string,
if (!shaderObject)
{
return error(GL_INVALID_VALUE);
return error(GL_INVALID_OPERATION);
}
shaderObject->setSource(count, string, length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment