sci2exp() applied to lists, tlists, mlists with undefined fields yields an error or a wrong result
Reported by Samuel GOUGEON (@sgougeon)
-- Bug description --
tlist2exp(tlist) called by sci2exp() fails when tlist has an undefined value. Patch attached.
-- Scilab error message --
-->t = tlist(["test" "a" "b" "c"],%pi,,%z)
t =
tlist of type "test" with fields:
.a 3.1415927
.b (undefined)
.c z
-->sci2exp(t)
!--error 4
Undefined variable: lk
at line 11 of function tlist2exp called by :
at line 73 of function sci2exp called by :
sci2exp(t)
-->tlist2exp(t)
!--error 4
Undefined variable: lk
at line 11 of function tlist2exp called by :
tlist2exp(t)
-- How to reproduce the bug --
Created an attachment (id=2087)
Patch for tlist2exp() for tlist with undefined values
t = tlist(["test" "a" "b" "c"],%pi,,%z)
sci2exp(t)
tlist2exp(t)