From 7181860ee655ed6f1d336df8e81370cff378659e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 9 Feb 2013 11:17:27 +0000 Subject: [PATCH] base: crash with an assert error if trying to access a read-only map with a nonexistent key. --- src/lol/base/map.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lol/base/map.h b/src/lol/base/map.h index d82c314b..233b3574 100644 --- a/src/lol/base/map.h +++ b/src/lol/base/map.h @@ -35,6 +35,7 @@ public: if (m_array[i].m2 == key) return m_array[i].m3; /* XXX: this in an error! */ + ASSERT(0, "trying to read a non-existent key in map"); return V(); }