Only look at whether the member variable has an array prefix.

TRAC #21593 Issue=367 Signed-off-by: Daniel Koch Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1285 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4fbf3392
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 1284 #define BUILD_REVISION 1285
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -49,7 +49,10 @@ Uniform::~Uniform() ...@@ -49,7 +49,10 @@ Uniform::~Uniform()
bool Uniform::isArray() bool Uniform::isArray()
{ {
return _name.compare(0, 3, "ar_") == 0; size_t dot = _name.find_last_of('.');
if (dot == std::string::npos) dot = -1;
return _name.compare(dot + 1, dot + 4, "ar_") == 0;
} }
UniformLocation::UniformLocation(const std::string &_name, unsigned int element, unsigned int index) UniformLocation::UniformLocation(const std::string &_name, unsigned int element, unsigned int index)
......
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