diff options
author | NotFound <julian.notfound@gmail.com> | 2012-03-14 23:36:34 +0100 |
---|---|---|
committer | NotFound <julian.notfound@gmail.com> | 2012-03-14 23:36:34 +0100 |
commit | f60b3e30907c33a478827ccbc8c1328e6f2d630a (patch) | |
tree | 2a9ede68cbf807f9a1a78b49ef4fc83db81d69b3 | |
parent | a9461cd8861fd449806ccb6cf0827762bd1089c1 (diff) | |
download | blassic-f60b3e30907c33a478827ccbc8c1328e6f2d630a.tar.gz |
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | program.cpp | 7 | ||||
-rw-r--r-- | runner.cpp | 4 | ||||
-rw-r--r-- | version.cpp | 2 |
4 files changed, 15 insertions, 6 deletions
@@ -1,3 +1,11 @@ +Version 0.10.3 + + Fix save silently failing if the file can't be open. + +Version 0.10.2 + + Minor fixes. + Version 0.10.1 Added msx option and charset. diff --git a/program.cpp b/program.cpp index 2d24c29..b6f0497 100644 --- a/program.cpp +++ b/program.cpp @@ -1,5 +1,5 @@ // program.cpp -// Revision 24-apr-2009 +// Revision 14-mar-2012 #include "program.h" @@ -1211,10 +1211,10 @@ void ProgramImpl::save (const std::string & name) const TRACEFUNC (tr, "ProgramImpl::save"); std::ofstream os (name.c_str (), std::ios::binary | std::ios::out); + if (! os.is_open()) + throw ErrFileWrite; // Blassic signature. - if (! os) - return; os.write (signature, lsig); // Endian mark. @@ -1228,6 +1228,7 @@ void ProgramImpl::save (const std::string & name) const // Program body. os.write ( (char *) program, size); + os.close(); if (! os) throw ErrFileWrite; } @@ -1,5 +1,5 @@ // runner.cpp -// Revision 24-apr-2009 +// Revision 14-mar-2012 #include "runner.h" @@ -2043,7 +2043,7 @@ void welcome (BlFile & f) version::Minor << '.' << version::Release; f.endline (); - f << "(C) 2001-2009 Julian Albo"; + f << "(C) 2001-2012 Julian Albo"; f.endline (); f.endline (); } diff --git a/version.cpp b/version.cpp index c41f295..33bdad8 100644 --- a/version.cpp +++ b/version.cpp @@ -8,6 +8,6 @@ const unsigned short version::Major= 0, version::Minor= 10, - version::Release= 2; + version::Release= 3; // End of version.cpp |