aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index dd070035a9..ccf48b792e 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -53,7 +53,13 @@ bool VideoPlayer::openVideo(const char *video, int16 x, int16 y, int16 flags, Ty
strncpy0(fileName, video, 250);
- char *extStart = strchr(fileName, '.');
+ char *extStart = strrchr(fileName, '.');
+ // There's no empty extension
+ if (extStart == (fileName + strlen(fileName) - 1)) {
+ *extStart = 0;
+ extStart = 0;
+ }
+
if (extStart) {
// The requested file already has an extension. Verifying.