On Thu, Feb 01, 2007 at 08:37:50PM +0000, Martin Guy wrote: > >> + string input = fn.arg(0).to_string(); > > > >Note that to_string() might return NULL, in which case > >the std::string constructor will segfault. > > Wot, even if fn.nargs==1 ?
mm.. maybe I was wrong. It seems that as_value::to_string() returns to_tu_string().c_str(), which is likely to never be NULL. Documentation fo that function lacks a warranty about this thought. Consider using to_std_string(), I added it some time ago for exactly this reason (reducing confusion). The downside of to_std_string() is that it currently returns by value... would be better once we change m_string_value from a tu_stringi to a std::string. --strk; _______________________________________________ Gnash-commit mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-commit
