From ab72b14d17a1f80ee049cdd8c77e973960fea108 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 13 Jun 2010 19:24:20 +0000 Subject: Internal XML parsing error handling is done via setjmp/longjmp, all allocation errors are now handled correctly (parser returns status_out_of_memory, modification functions return errors); added tests for some out of memory situations git-svn-id: http://pugixml.googlecode.com/svn/trunk@520 99668b35-9821-0410-8761-19e4c4f06640 --- tests/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/main.cpp') diff --git a/tests/main.cpp b/tests/main.cpp index 444b188..b8d4e53 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -15,7 +15,7 @@ static size_t g_memory_total_count = 0; static void* custom_allocate(size_t size) { - if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < size) + if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < g_memory_total_size + size) return 0; else { -- cgit v1.2.3