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

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

[Octave-bug-tracker] [bug #59607] containers.Map values method fails wit


From: Guillaume
Subject: [Octave-bug-tracker] [bug #59607] containers.Map values method fails with "." notation and cellstr indexing
Date: Wed, 2 Dec 2020 17:52:03 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #2, bug #59607 (project octave):

A potential fix:


--- a/scripts/+containers/Map.m Mon Nov 23 16:11:46 2020 +0900
+++ b/scripts/+containers/Map.m Wed Dec 02 22:49:19 2020 +0000
@@ -379,7 +379,12 @@
             case "keys"
               sref = keys (this);
             case "values"
-              sref = values (this);
+              if (numel (s) > 1 && strcmp (s(2).type, "()"))
+                sref = values (this, s(2).subs{1});
+                s(2) = [];
+              else
+                sref = values (this);
+              end
             case "size"
               sref = size (this);
             case "length"


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59607>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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