pie() unnecessarily strict checking size of input

Andy Buckle andybuckle at gmail.com
Tue Feb 24 15:24:40 CST 2009


version
-------
3.1.52 x86_64-unknown-linux-gnu
also observed on 3.0.3 MSVC

reproduce with
-------------
pie([1 2], cellstr(['one';'two']))

fix
---
diff -r c84a5b6377c4 scripts/plot/pie.m
--- a/scripts/plot/pie.m        Mon Feb 23 12:55:32 2009 -0500
+++ b/scripts/plot/pie.m        Tue Feb 24 21:02:46 2009 +0000
@@ -85,7 +85,7 @@
     if (iscell (arg))
       labels = arg;
       have_labels = true;
-      if (! size_equal (x, labels))
+      if (length(x) != length(labels))
        error ("pie: mismatch in number of labels and data");
       endif
     elseif (isnumeric (arg))


More information about the Bug-octave mailing list