aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/control.cpp')
-rw-r--r--engines/zvision/control.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/zvision/control.cpp b/engines/zvision/control.cpp
index 02d15fe9d0..eeba9b3214 100644
--- a/engines/zvision/control.cpp
+++ b/engines/zvision/control.cpp
@@ -44,7 +44,7 @@ void Control::parsePanoramaControl(ZVision *engine, Common::SeekableReadStream &
Common::String line = stream.readLine();
trimCommentsAndWhiteSpace(&line);
- while (!line.contains('}')) {
+ while (!stream.eos() && !line.contains('}')) {
if (line.matchString("angle*", true)) {
float fov;
sscanf(line.c_str(), "angle(%f)", &fov);
@@ -78,7 +78,7 @@ void Control::parseTiltControl(ZVision *engine, Common::SeekableReadStream &stre
Common::String line = stream.readLine();
trimCommentsAndWhiteSpace(&line);
- while (!line.contains('}')) {
+ while (!stream.eos() && !line.contains('}')) {
if (line.matchString("angle*", true)) {
float fov;
sscanf(line.c_str(), "angle(%f)", &fov);
@@ -110,7 +110,7 @@ void Control::parsePushToggleControl(uint32 key, ZVision *engine, Common::Seekab
Common::String line = stream.readLine();
trimCommentsAndWhiteSpace(&line);
- while (!line.contains('}')) {
+ while (!stream.eos() && !line.contains('}')) {
if (line.matchString("*_hotspot*", true)) {
uint x;
uint y;