Commit 570bfc7c by alokp@chromium.org

Built-in string for vertex shaders can be empty. Nicolas handled this case in…

Built-in string for vertex shaders can be empty. Nicolas handled this case in r433 but r437 overwrote it. Review URL: http://codereview.appspot.com/2233046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@439 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e979ead8
...@@ -41,13 +41,12 @@ static bool InitializeSymbolTable( ...@@ -41,13 +41,12 @@ static bool InitializeSymbolTable(
for (TBuiltInStrings::const_iterator i = builtInStrings.begin(); i != builtInStrings.end(); ++i) for (TBuiltInStrings::const_iterator i = builtInStrings.begin(); i != builtInStrings.end(); ++i)
{ {
const char* builtInShaders[1]; const char* builtInShaders = i->c_str();
int builtInLengths[1]; int builtInLengths = static_cast<int>(i->size());
if (builtInLengths <= 0)
continue;
builtInShaders[0] = (*i).c_str(); if (PaParseStrings(&builtInShaders, &builtInLengths, 1, parseContext) != 0)
builtInLengths[0] = (int) (*i).size();
if (PaParseStrings(builtInShaders, builtInLengths, 1, parseContext) != 0)
{ {
infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins"); infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins");
return false; return false;
......
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