DIRECTOR: Improve path converting

This commit is contained in:
Eugene Sandulenko 2020-01-01 15:24:15 +01:00
parent ec56be281d
commit 724ced87d0
2 changed files with 4 additions and 4 deletions

View File

@ -212,8 +212,8 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
}
}
debug(1, "func_goto: '%s' -> '%s' -> '%s", movie.u.s->c_str(), movieFilename.c_str(),
cleanedFilename.c_str());
debug(1, "func_goto: '%s' -> '%s' -> '%s' -> '%s", movie.u.s->c_str(), convertPath(*movie.u.s).c_str(),
movieFilename.c_str(), cleanedFilename.c_str());
if (!fileExists) {
warning("Movie %s does not exist", movieFilename.c_str());

View File

@ -122,9 +122,9 @@ Common::String convertPath(Common::String &path) {
Common::String res;
uint32 idx = 0;
if (path.hasPrefix(":::")) {
if (path.hasPrefix("::")) {
res = "../";
idx = 3;
idx = 2;
} else {
res = "./";
idx = 1;