- Fixed issue with short form of switches and parameter if not first switch.
- Fixed #1708378 segfault in actions.cc.
+Version 0.12.2 (2007-06-26)
+---------------------------
+- Fixed #1743180 fwrite with 0 length crashes on OS X.
+
Version 0.12.1 (2007-05-23
---------------------------
- Fixed #1711240 problem with '"' and 7F on EBCDIC plattforms.
<li>Fixed issue with short form of switches and parameter if not first switch.</li>
<li>Fixed #1708378 segfault in actions.cc.</li>
</ul>
+<h2>2007-06-26: 0.12.2</h2>
+<ul>
+<li>Fixed #1743180 fwrite with 0 length crashes on OS X.</li>
+</ul>
<h2>2007-05-23: 0.12.1</h2>
<ul>
<li>Fixed #1711240 problem with '"' and 7F on EBCDIC plattforms.</li>
virtual int sync()
{
- fwrite(buffer.c_str(), sizeof(_E), buffer.length(), fp);
+ if (buffer.length() != 0) {
+ fwrite(buffer.c_str(), sizeof(_E), buffer.length(), fp);
+ }
buffer.clear();
return fp == 0
|| _Tr::eq_int_type(_Tr::eof(), overflow())
virtual std::streamsize xsputn(const _E *buf, std::streamsize cnt)
{
- fwrite(buffer.c_str(), sizeof(_E), buffer.length(), fp);
+ if (buffer.length() != 0) {
+ fwrite(buffer.c_str(), sizeof(_E), buffer.length(), fp);
+ }
buffer.clear();
/*fline += std::count(buf, buf + cnt, '\n');*/
for (std::streamsize pos = 0; pos < cnt; ++pos)
++fline;
}
}
- return fwrite(buf, sizeof(_E), cnt, fp);
+ if (cnt != 0) {
+ return fwrite(buf, sizeof(_E), cnt, fp);
+ } else {
+ return 0;
+ }
}
private: