Gallivm: fix off-by-one.
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Sun, 28 Sep 2008 21:18:55 +0000 (23:18 +0200)
committerZack Rusin <zack@tungstengraphics.com>
Thu, 2 Oct 2008 14:19:47 +0000 (10:19 -0400)
src/gallium/auxiliary/gallivm/instructionssoa.cpp

index efddc04e818a67d899462338b5b91c0eb7fea8ba..9a3ed9f538dbdb2c36368021561ddf9f84825ee4 100644 (file)
@@ -259,7 +259,7 @@ void InstructionsSoa::createBuiltins()
 {
    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);
    std::cout<<"Builtins created at "<<m_builtins<<std::endl;
    assert(m_builtins);