瀏覽代碼

Merge pull request #1396 from Azaezel/reportRange

Adds data to vector out of bounds reports
Daniel Buckmaster 10 年之前
父節點
當前提交
0172f22cb4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Engine/source/core/util/tVector.h

+ 2 - 2
Engine/source/core/util/tVector.h

@@ -684,13 +684,13 @@ template<class T> inline void Vector<T>::pop_back()
 
 template<class T> inline T& Vector<T>::operator[](U32 index)
 {
-   AssertFatal(index < mElementCount, "Vector<T>::operator[] - out of bounds array access!");
+   AssertFatal(index < mElementCount, avar("Vector<T>::operator[%i/%i] - out of bounds array access!", index, mElementCount));
    return mArray[index];
 }
 
 template<class T> inline const T& Vector<T>::operator[](U32 index) const
 {
-   AssertFatal(index < mElementCount, "Vector<T>::operator[] - out of bounds array access!");
+   AssertFatal(index < mElementCount, avar("Vector<T>::operator[%i/%i] - out of bounds array access!", index, mElementCount));
    return mArray[index];
 }