Fix initialization of arrays in TGlslIoMapper
The inVarMaps, outVarMaps, uniformVarMap, and intermediates arrays were being memset with a size 1 bigger than their actual size. They are now initialized correctly, which also allows making inVarMaps, outVarMaps, and uniformVarMap into private members.
This commit is contained in:
parent
b618604e77
commit
015cb4ce5c
2 changed files with 6 additions and 6 deletions
|
|
@ -1601,10 +1601,10 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSi
|
|||
}
|
||||
|
||||
TGlslIoMapper::TGlslIoMapper() {
|
||||
memset(inVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
|
||||
memset(outVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
|
||||
memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
|
||||
memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1));
|
||||
memset(inVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
|
||||
memset(outVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
|
||||
memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * EShLangCount);
|
||||
memset(intermediates, 0, sizeof(TIntermediate*) * EShLangCount);
|
||||
profile = ENoProfile;
|
||||
version = 0;
|
||||
autoPushConstantMaxSize = 128;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue