This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 11854dc89ed5925d39634de12048cee9e0f7547a
Author: krzys-h <[email protected]>
Date:   Mon Oct 27 21:49:03 2014 +0100

    Fixed script saving (issue #348)
---
 src/object/robotmain.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 012b08a..adbe81d 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -5465,9 +5465,12 @@ void CRobotMain::LoadFileScript(CObject *obj, const 
char* filename, int objRank,
     ObjectType type = obj->GetType();
     if (type == OBJECT_HUMAN) return;
 
-
+    
+    std::string fnstr = filename;
+    boost::replace_all(fnstr, m_dialog->GetSavegameDir(), 
m_dialog->GetPHYSFSSavegameDir()); //TODO: Refactor to get physfs path here
+    //TODO: Refactor to std::string
     char fn[MAX_FNAME];
-    strcpy(fn, filename);
+    strcpy(fn, fnstr.c_str());
     char* ldir = SearchLastDir(fn);
     if (ldir == 0) return;
 
@@ -5534,8 +5537,11 @@ void CRobotMain::SaveFileScript(CObject *obj, const 
char* filename, int objRank)
     ObjectType type = obj->GetType();
     if (type == OBJECT_HUMAN) return;
 
+    std::string fnstr = filename;
+    boost::replace_all(fnstr, m_dialog->GetSavegameDir(), 
m_dialog->GetPHYSFSSavegameDir()); //TODO: Refactor to get physfs path here
+    //TODO: Refactor to std::string
     char fn[MAX_FNAME];
-    strcpy(fn, filename);
+    strcpy(fn, fnstr.c_str());
     char* ldir = SearchLastDir(fn);
     if (ldir == 0) return;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to