aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-04-06 16:17:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-04-06 16:17:57 +0200
commit8eeebe8f6d91af4219fac3a29252a802ee58fe04 (patch)
treeb185f121277433df64227b617d130de332cf09e3
parent6e4d86618645c45d07c3a8113f4641cb9161309e (diff)
Check the bounds before checking the value in genx code
Also fix test makefile not to run polymorphic test when support for polymorphism is disabled.
-rw-r--r--libxsde/xsde/c/genx/genx.c2
-rw-r--r--tests/cxx/hybrid/makefile6
2 files changed, 6 insertions, 2 deletions
diff --git a/libxsde/xsde/c/genx/genx.c b/libxsde/xsde/c/genx/genx.c
index f838f42..d856505 100644
--- a/libxsde/xsde/c/genx/genx.c
+++ b/libxsde/xsde/c/genx/genx.c
@@ -1529,7 +1529,7 @@ static genxStatus collectAttributeValue (genxWriter w, collector* value,
utf8 last = (utf8) start;
- while (*start && (end == NULL || start < end))
+ while (end != NULL ? start < end : *start)
{
int c = genxNextUnicodeChar(&start);
diff --git a/tests/cxx/hybrid/makefile b/tests/cxx/hybrid/makefile
index 46fc06c..27fab94 100644
--- a/tests/cxx/hybrid/makefile
+++ b/tests/cxx/hybrid/makefile
@@ -5,7 +5,11 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-tests := polymorphism sequences
+tests := sequences
+
+ifeq ($(xsde_polymorphism),y)
+tests += polymorphism
+endif
ifeq ($(xsde_iostream),y)
tests += built-in default list recursive test-template union