From 8eeebe8f6d91af4219fac3a29252a802ee58fe04 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Apr 2009 16:17:57 +0200 Subject: 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. --- libxsde/xsde/c/genx/genx.c | 2 +- tests/cxx/hybrid/makefile | 6 +++++- 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 -- cgit v1.1