e.g. In a terrain segment of of 8x8 there are 64 vertices, 128 faces and 384 indices. During the software rendering of the vertex and index buffers Decade engine crashed when the offset into the index buffer reached 147. It caused incorrect rendering or an Access violation because the value of the index buffer was 52685, but the vertex array has only 384 elements. Further investigation showed this to be an error with the memory copy functionality in the index buffer create function.
memcpy( this->m_pusIndices, p_pusIndices, p_iNumberOfIndices );
it should have been
memcpy( this->m_pusIndices, p_pusIndices, p_iNumberOfIndices * sizeof(unsigned short) );