aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNotFound <julian.notfound@gmail.com>2012-03-14 23:36:34 +0100
committerNotFound <julian.notfound@gmail.com>2012-03-14 23:36:34 +0100
commitf60b3e30907c33a478827ccbc8c1328e6f2d630a (patch)
tree2a9ede68cbf807f9a1a78b49ef4fc83db81d69b3
parenta9461cd8861fd449806ccb6cf0827762bd1089c1 (diff)
downloadblassic-master.tar.gz
Version 0.10.3 - fix bug in saveHEADmaster
-rw-r--r--NEWS8
-rw-r--r--program.cpp7
-rw-r--r--runner.cpp4
-rw-r--r--version.cpp2
4 files changed, 15 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 5bfc64c..4ae931a 100644
--- a/NEWS
+++ b/NEWS
@@ -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;
}
diff --git a/runner.cpp b/runner.cpp
index 546b660..bbabad9 100644
--- a/runner.cpp
+++ b/runner.cpp
@@ -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
Un proyecto texto-plano.xyz