aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/text.cpp4
-rw-r--r--engines/cge/vga13h.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index a8ce8777c5..27bb0608fd 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -68,7 +68,7 @@ int16 Text::count() {
for (line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
char *s;
-
+ assert(line.size() <= 513);
strcpy(tmpStr, line.c_str());
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
continue;
@@ -101,7 +101,7 @@ void Text::load() {
for (idx = 0, line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
int n = line.size();
char *s;
-
+ assert(n <= 513);
strcpy(tmpStr, line.c_str());
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
continue;
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index e178795b7c..56a0754527 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -214,6 +214,7 @@ Sprite *Sprite::expand() {
for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
len = line.size();
+ assert(len <= 513);
strcpy(tmpStr, line.c_str());
lcnt++;
if (len == 0 || *tmpStr == '.')