summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/element.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/kernel/element.hpp')
-rw-r--r--sca-cpp/trunk/kernel/element.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/kernel/element.hpp b/sca-cpp/trunk/kernel/element.hpp
index 612752d1df..4570110e96 100644
--- a/sca-cpp/trunk/kernel/element.hpp
+++ b/sca-cpp/trunk/kernel/element.hpp
@@ -98,7 +98,7 @@ const value elementHasValue(const list<value>& l) {
const list<value> r = reverse(l);
if (isSymbol(car(r)))
return false;
- if(isList(car(r)) && isSymbol(car<value>(car(r))))
+ if(isList(car(r)) && !isNil((list<value>)car(r)) && isSymbol(car<value>(car(r))))
return false;
return true;
}
@@ -201,7 +201,7 @@ const value valueToElement(const value& t) {
return mklist(element, n, v);
// Convert a list value
- if (!isSymbol(car<value>(v)))
+ if (isNil((list<value>)v) || !isSymbol(car<value>(v)))
return cons(element, cons(n, mklist<value>(valuesToElements(v))));
// Convert a nested name value pair value