aboutsummaryrefslogtreecommitdiff
path: root/engines/queen/journal.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-09-09 06:47:41 +0000
committerFilippos Karapetis2008-09-09 06:47:41 +0000
commit814e27fe406a6fdc380ad426e9e3c3955514f571 (patch)
tree84b9fa15465a60d7d6334933a0f9c440413347b9 /engines/queen/journal.cpp
parent83e09d1aa499c827d167642de0a8ffb783c4818e (diff)
downloadscummvm-rg350-814e27fe406a6fdc380ad426e9e3c3955514f571.tar.gz
scummvm-rg350-814e27fe406a6fdc380ad426e9e3c3955514f571.tar.bz2
scummvm-rg350-814e27fe406a6fdc380ad426e9e3c3955514f571.zip
Fix for bug #2101083 - "ANY - MSVC71 compilation fails due to warnings-as-errors"
svn-id: r34457
Diffstat (limited to 'engines/queen/journal.cpp')
-rw-r--r--engines/queen/journal.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index ead759cdb6..7846fa5c36 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -385,16 +385,18 @@ void Journal::drawPanelText(int y, const char *text) {
char s[128];
strncpy(s, text, 127);
s[127] = 0;
+ char *p;
+
// remove leading and trailing spaces (necessary for spanish version)
- for (char *p = s + strlen(s) - 1; p >= s && *p == ' '; --p) {
+ for (p = s + strlen(s) - 1; p >= s && *p == ' '; --p) {
*p = 0;
}
text = s;
- for (char *p = s; *p == ' '; ++p) {
+ for (p = s; *p == ' '; ++p) {
text = p + 1;
}
// draw the substrings
- char *p = (char *)strchr(text, ' ');
+ p = (char *)strchr(text, ' ');
if (!p) {
int x = (128 - _vm->display()->textWidth(text)) / 2;
_vm->display()->setText(x, y, text, false);