Fix crash in tabulating long-string variables in CROSSTABS.
[pspp-builds.git] / src / language / stats / crosstabs.q
index 4c5309bfda6e1dd0053331ee9da3f8029b5c8a27..e16c8dc2a04b30553df92d27998bf5f8bcac4938 100644 (file)
@@ -1674,7 +1674,7 @@ enum_var_values (struct table_entry **entries, int entry_cnt, int var_idx,
 
   if (mode == GENERAL)
     {
-      int width = var_get_width (v);
+      int width = MIN (var_get_width (v), MAX_SHORT_STRING);
       int i;
 
       *values = xnmalloc (entry_cnt, sizeof **values);