diff options
-rw-r--r-- | engines/cge2/cge2_main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 7c4a111d1f..328af08f53 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -777,11 +777,12 @@ void CGE2Engine::setEye(const V2D& e2, int z) { } void CGE2Engine::setEye(const char *s) { - char tempStr[kLineMax]; + char *tempStr = new char[strlen(s) + 1]; strcpy(tempStr, s); _eye->_x = atoi(token(tempStr)); _eye->_y = atoi(token(nullptr)); _eye->_z = atoi(token(nullptr)); + delete[] tempStr; } int CGE2Engine::newRandom(int range) { |