Commit 322ab8f3 by Timo Suoranta

Fix memory corruption in TGlslIoMapper

parent 5e86b28f
...@@ -261,10 +261,10 @@ public: ...@@ -261,10 +261,10 @@ public:
class TGlslIoMapper : public TIoMapper { class TGlslIoMapper : public TIoMapper {
public: public:
TGlslIoMapper() { TGlslIoMapper() {
memset(inVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1)); memset(inVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
memset(outVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1)); memset(outVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1)); memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * EShLangCount);
memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1)); memset(intermediates, 0, sizeof(TIntermediate*) * EShLangCount);
} }
virtual ~TGlslIoMapper() { virtual ~TGlslIoMapper() {
for (size_t stage = 0; stage < EShLangCount; stage++) { for (size_t stage = 0; stage < EShLangCount; stage++) {
......
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