initialze appended symbols with 0

This commit is contained in:
john30
2014-11-02 22:13:01 +01:00
parent 2525c4fe00
commit cb695ca132
Regular → Executable
+1 -1
View File
@@ -69,7 +69,7 @@ public:
* @param index the index of the symbol to return.
* @return the reference to the symbol at the specified index.
*/
unsigned char& operator[](const size_t index) { if (index >= m_data.size()) m_data.resize(index+1); return m_data[index]; }
unsigned char& operator[](const size_t index) { if (index >= m_data.size()) m_data.resize(index+1, 0); return m_data[index]; }
/**
* @brief Returns the symbol at the specified index.
* @param index the index of the symbol to return.