XPath: Final MinGW unwind workaround
git-svn-id: http://pugixml.googlecode.com/svn/trunk@650 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
3284cc2f1b
commit
6a9d59e907
@ -514,9 +514,17 @@ namespace
|
||||
else
|
||||
{
|
||||
// need to make dummy on-heap copy
|
||||
string_t copy(begin, end);
|
||||
char_t* copy = static_cast<char_t*>(get_memory_allocation_function()((length + 1) * sizeof(char_t)));
|
||||
if (!copy) return gen_nan(); // $$ out of memory
|
||||
|
||||
return convert_string_to_number(copy.c_str());
|
||||
memcpy(copy, begin, length * sizeof(char_t));
|
||||
copy[length] = 0;
|
||||
|
||||
double result = convert_string_to_number(copy);
|
||||
|
||||
get_memory_deallocation_function()(copy);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user