Committed patch #5636
[pspp-builds.git] / src / data / value-labels.c
index 56491535fca0f940817acd76512bca638db10bcb..f54a4870fc05bf3b02ac9a2e6405cde5dbfefe62 100644 (file)
@@ -90,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;