[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46660] object array writing into class member
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #46660] object array writing into class member alters another class member |
Date: |
Tue, 3 Jan 2017 09:48:23 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Follow-up Comment #6, bug #46660 (project octave):
I'm terribly sorry about the buggy patch last time, and for whatever went
wrong with my testing process. This new patch Should Work(tm).
The previous patch identified cases where the index ival had only one
dimension, and padded it on the right with "1". In principle, that avoids the
bug described in comment #2, but has two bugs.
1. I was using index 1 as the base instead of index 0, so that an assignment
to (2) was incorrectly being assigned to (2,2).
2. Creating a(2) creates a(1,2) rather than a(2,1) as I had assumed. That
means the padding should be on the left in that case, instead of on the right.
The new patch checks whether to pad on the left or right, based on whether or
not the first dimension is a singleton.
(file #39354)
_______________________________________________________
Additional Item Attachment:
File name: bug_46660_classdef_array_v2.cset Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46660>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46660] object array writing into class member alters another class member,
Lachlan Andrew <=