diff --git a/src/musrgui/PTextEdit.cpp b/src/musrgui/PTextEdit.cpp index f513fb3c..e1a9ee8f 100644 --- a/src/musrgui/PTextEdit.cpp +++ b/src/musrgui/PTextEdit.cpp @@ -29,6 +29,9 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include +using namespace std; + #include #include #include @@ -814,12 +817,16 @@ void PTextEdit::musrView() str = fAdmin->getExecPath() + "/musrview"; cmd = str + " "; - str = *fFilenames.find( currentEditor()); + str = *fFilenames.find( currentEditor() ); if (fShowMlog) { - str.replace(str.find(".msr"), 4, ".mlog"); + int idx = str.find(".msr"); + if (idx > 0) + str.replace(idx, 4, ".mlog"); } cmd += str + " &"; +cout << endl << "str = " << str << endl; + system(cmd.latin1()); }