Assignments in a struct array often overwrite some untargeted elements
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
clear s
// Let's create a simple 2x2 struct array with a single field, setting its first column, then its second column, in usual increasing linear indices:
s.r = 1.2345;
s(2,1).r = 2.345;
s.r // OK
// Second column:
s(1,2).r = %i;
s.r // OK, except the occurring bug 15261 (s(2,2) is initialized with %i instead of <void>).
s(2,2).r = 1-%i;
s.r // NOK: this assignment has replaced %i @ (1,2) with (1-%i)!!
s(1,2).r == %i // => %F
This is THIS bug!
ERROR LOG:
----------
None. Wrong behavior
HOW TO REPRODUCE THE BUG:
-------------------------
clear s
s.r = 1.2345;
s(2,1).r = 2.345;
s(1,2).r = %i;
s(2,2).r = 1-%i;
s(1,2).r == %i
OTHER INFORMATION:
------------------
=> Hard to use any struct array in Scilab 6.