Skip to content

justify() misworks for hypermatrices: only the first page is processed

Reported by Samuel GOUGEON (@sgougeon)

BUG DESCRIPTION:
----------------
justify() misworks for hypermatrices: only the first page is processed:

--> m = ["a" "bc" ; "cd" "e"];
--> h = cat(3,m,m)
 h  = 
(:,:,1)

  "a"   "bc"
  "cd"  "e" 
(:,:,2)

  "a"   "bc"
  "cd"  "e" 

--> justify(h,"l")
 ans  =
(:,:,1)

  "a "  "bc"    <<<  OK: "a" and "e" are padded
  "cd"  "e "

(:,:,2)
  "a"   "bc"    <<<  KO: "a" and "e" are unchanged
  "cd"  "e" 


ERROR LOG:
----------


HOW TO REPRODUCE THE BUG:
-------------------------
m = ["a" "bc" ; "cd" "e"];
h = cat(3, m, m);
hj = justify(h,"l");
hj([5 8]) == ["a ","e "]


OTHER INFORMATION:
------------------
Since 6.0.0 (before hypermatrices yielded an error), and still in 6.1.1 now.