Committed patch #5636
[pspp-builds.git] / src / data / value-labels.c
index 9f058ad61585e426cacca171e903c8a096b998bd..f54a4870fc05bf3b02ac9a2e6405cde5dbfefe62 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -91,7 +90,8 @@ val_labs_copy (const struct val_labs *vls)
 bool
 val_labs_can_set_width (const struct val_labs *vls, int new_width) 
 {
-  assert ((vls->width == 0) == (new_width == 0));
+  if ( var_type_from_width (new_width) != var_type_from_width (vls->width ))
+    return false;
 
   if (vls->width == 0)
     return new_width == 0;