# HG changeset patch # User Markus Mützel # Date 1709999853 -3600 # Node ID a959fc381fee95cacf1f719c8369c575e2969c3d # Parent 4ec97d8770ffbcef7a158c65893ab9f66d857725# Parent 2bee38885727faa7711615788e245aa0c3f253b9 maint: Merge stable to default. diff -r 4ec97d8770ff -r a959fc381fee libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Thu Mar 07 16:12:15 2024 -0500 +++ b/libinterp/corefcn/graphics.cc Sat Mar 09 16:57:33 2024 +0100 @@ -9835,6 +9835,15 @@ return; } + // Check if number of color values matches number of faces or vertices + octave_idx_type nfvc = fvc.rows (); + if (nfvc > 1 && nfvc != nfaces && nfvc != nvert) + { + m_bad_data_msg = "number of facevertexcdata values matches " + "neither number of faces nor number of vertices"; + return; + } + // Replace NaNs if (idx.any_element_is_inf_or_nan ()) { @@ -9901,21 +9910,20 @@ if (fvc.rows () == nfaces || fvc.rows () == 1) { + // "facevertexcdata" holds color data per face or same color for all dv(0) = 1; dv(1) = fvc.rows (); dv(2) = fvc.columns (); cd = fvc.reshape (dv); } - else - { - if (! fvc.isempty ()) - { - dv(0) = idx.rows (); - dv(1) = nfaces; - dv(2) = fvc.columns (); - cd.resize (dv); - pervertex = true; - } + else if (! fvc.isempty ()) + { + // "facevertexcdata" holds color data per vertex + dv(0) = idx.rows (); + dv(1) = nfaces; + dv(2) = fvc.columns (); + cd.resize (dv); + pervertex = true; } // Build x,y,zdata and eventually per vertex cdata diff -r 4ec97d8770ff -r a959fc381fee libinterp/corefcn/regexp.cc --- a/libinterp/corefcn/regexp.cc Thu Mar 07 16:12:15 2024 -0500 +++ b/libinterp/corefcn/regexp.cc Sat Mar 09 16:57:33 2024 +0100 @@ -880,9 +880,9 @@ complement), and then further processing the return variables (now reduced in size) with successive @code{regexp} searches. -Octave's @code{regexp} implementaion is based on the Perl Compatible +Octave's @code{regexp} implementation is based on the Perl Compatible Regular Expressions library (@url{https://www.pcre.org/}). For a more -comprehensive list of rexexp operator syntax see the +comprehensive list of @code{regexp} operator syntax see the @url{https://www.pcre.org/current/doc/html/pcre2syntax.html,, "PCRE Syntax quick-reference summary"}.