From: <ad...@us...> - 2011-06-18 13:37:31
|
Revision: 1250 http://xlw.svn.sourceforge.net/xlw/?rev=1250&view=rev Author: adcockj Date: 2011-06-18 13:37:25 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Clear out memory before use. Prevent a new oper structure from containing something excel complains about Modified Paths: -------------- Dev5/xlw/xlw/src/TempMemory.cpp Modified: Dev5/xlw/xlw/src/TempMemory.cpp =================================================================== --- Dev5/xlw/xlw/src/TempMemory.cpp 2011-06-18 00:00:29 UTC (rev 1249) +++ Dev5/xlw/xlw/src/TempMemory.cpp 2011-06-18 13:37:25 UTC (rev 1250) @@ -121,12 +121,14 @@ // or enough to hold all the of data used on previous buffer and this data and a bit of spare // space, whichever is greater PushNewBuffer(std::max((buffer.size * 3) / 2, (offset_ + bytes) + 4096)); + memset(buffer.start.get(), 0, bytes); offset_ = bytes; return freeList_.front().start.get(); } else { size_t temp = offset_; + memset(buffer.start.get() + temp, 0, bytes); offset_ += bytes; return buffer.start.get() + temp; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |