table-paste: Add error-checking assertion to table_paste().
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 22 Jul 2014 04:42:08 +0000 (21:42 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 22 Jul 2014 04:42:08 +0000 (21:42 -0700)
src/output/table-paste.c

index b56760cd1d7a0f4b6c8b5aaa96da77902ae7cda7..c1054d1369baf1e5c05915edd8221004206c8ec9 100644 (file)
@@ -148,6 +148,8 @@ table_paste (struct table *a, struct table *b, enum table_axis orientation)
   if (b == NULL)
     return a;
 
+  assert (a->n[!orientation] == b->n[!orientation]);
+
   /* Handle tables that know how to paste themselves. */
   if (!table_is_shared (a) && !table_is_shared (b) && a != b)
     {