Mercurial > hg > octave-terminal
changeset 12003:10fb62b82108 release-3-2-x
properly unshare variable in subsasgn
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 22 Jun 2009 07:56:24 +0200 |
parents | 59fb9a2d9aca |
children | ff8c445edeb4 |
files | src/ChangeLog src/ov.cc |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-06-20 Jaroslav Hajek <highegg@gmail.com> + + * ov.cc (Fsubsasgn): Uniquify shared value before assigning to it. + 2009-06-17 John W. Eaton <jwe@octave.org> * mex.cc (mxArray_octave_value::get_data):
--- a/src/ov.cc +++ b/src/ov.cc @@ -2712,8 +2712,12 @@ decode_subscripts ("subsasgn", args(1), type, idx); + octave_value arg0 = args(0); + + arg0.make_unique (); + if (! error_state) - retval = args(0).subsasgn (type, idx, args(2)); + retval = arg0.subsasgn (type, idx, args(2)); } else print_usage ();