diff options
author | Michel Dänzer <[email protected]> | 2009-01-12 15:05:05 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-01-12 15:05:05 +0100 |
commit | 45604ffac705a39e4cefa6b523e69535daf0db5b (patch) | |
tree | fef882f1ec05c7bd0cdd5a1fc225eb66f0ee37a7 /src/gallium/auxiliary/gallivm/instructionssoa.cpp | |
parent | f43e621e2207f819f756d9b9539b2a25b7b936fe (diff) |
gallivm: Make sure the bitcode buffer is followed by a 0 byte.
May fail to parse otherwise.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.cpp')
-rw-r--r-- | src/gallium/auxiliary/gallivm/instructionssoa.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.cpp b/src/gallium/auxiliary/gallivm/instructionssoa.cpp index f93a31d54ba..925e948763e 100644 --- a/src/gallium/auxiliary/gallivm/instructionssoa.cpp +++ b/src/gallium/auxiliary/gallivm/instructionssoa.cpp @@ -209,7 +209,7 @@ void InstructionsSoa::createBuiltins() std::string ErrMsg; MemoryBuffer *buffer = MemoryBuffer::getMemBuffer( (const char*)&soabuiltins_data[0], - (const char*)&soabuiltins_data[Elements(soabuiltins_data)]); + (const char*)&soabuiltins_data[Elements(soabuiltins_data) - 1]); m_builtins = ParseBitcodeFile(buffer, &ErrMsg); std::cout<<"Builtins created at "<<m_builtins<<" ("<<ErrMsg<<")"<<std::endl; assert(m_builtins); |