|
From: SourceForge.net <no...@so...> - 2011-11-28 16:25:46
|
Bugs item #3444220, was opened at 2011-11-28 08:25 Message generated for change (Tracker Item Submitted) made by daveblob You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3444220&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dave Blob (daveblob) Assigned to: Nobody/Anonymous (nobody) Summary: ConvertOper string bug Initial Comment: ConvertOper::operator std::string() const tries to access a temporary variable after it is destroyed (xString becomes a reference to the deleted variable xTemp). Here's a fix: ConvertOper::operator std::string() const { const OPER *xString; if (oper_->xltype == xltypeStr) { xString = oper_; } else { Xloper xTemp; Excel(xlCoerce, &xTemp, 2, oper_, TempInt(xltypeStr)); xString = &xTemp; } return strConv(xString); } Could be replaced with: ConvertOper::operator std::string() const { const OPER *xString; if (oper_->xltype == xltypeStr) { xString = oper_; return strConv(xString); } else { Xloper xTemp; Excel(xlCoerce, &xTemp, 2, oper_, TempInt(xltypeStr)); xString = &xTemp; return strConv(xString); } } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3444220&group_id=12740 |