octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34868] subsref crashes octave


From: Lukas Reichlin
Subject: [Octave-bug-tracker] [bug #34868] subsref crashes octave
Date: Mon, 21 Nov 2011 23:25:41 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22

Follow-up Comment #9, bug #34868 (project octave):

I see your point. But the fact that I discovered the bug/crash after all these
years indicates that there can't be much code out there relying on octave
throwing an error. IMHO the feature would be much less dangerous than
enhancements like Jordi's automatic bsxfun. However, I would still check
whether fieldnames s.type and s.subs are present in the 1x0 struct array and
only return argument "a" in this special case. For any other empty argument I
would throw an error too, which seems to be already the case with existing
octave releases.

@jwe: Yes, my intention is to avoid code like

if (numel (s) == 1)
  ret = q.w;
else
  ret = subsref (q.w, s(2:end));
endif


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34868>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]