Commit 80a68abd authored by Brice Videau's avatar Brice Videau
Browse files

Hardened checks in ruby.

parent 7518220c
......@@ -133,6 +133,8 @@ module CCS
p_values = MemoryPointer::new(:ccs_datum_t, count)
values.each_with_index{ |v, i| Datum::new(p_values[i]).value = v }
values = p_values
elsif values || context
raise CCSError, :CCS_INVALID_VALUES
end
ptr = MemoryPointer::new(:ccs_datum_t)
res = CCS.ccs_expression_eval(@handle, context, values, ptr)
......@@ -252,6 +254,8 @@ module CCS
p_values = MemoryPointer::new(:ccs_datum_t, count)
values.each_with_index{ |v, i| Datum::new(p_values[i]).value = v }
values = p_values
elsif values || context
raise CCSError, :CCS_INVALID_VALUES
end
ptr = MemoryPointer::new(:ccs_datum_t)
res = CCS.ccs_expression_list_eval_node(@handle, context, values, index, ptr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment