X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=bf467440aa7ce294cb4f5a9aa7d0fdfef590d01a;hb=5853c2fb0300e3db0ac6a06f1d91a7454f53be42;hp=f74ae00761dca42549cdb242865364a73c10a403;hpb=c489ad9041918ca8c80dadceade988daab1d25f8;p=pspp-builds.git diff --git a/src/data/dictionary.c b/src/data/dictionary.c index f74ae007..bf467440 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -281,7 +281,7 @@ dict_create_var (struct dictionary *d, const char *name, int width) v->type = width == 0 ? NUMERIC : ALPHA; v->width = width; v->fv = d->next_value_idx; - v->nv = width_to_bytes(width) / MAX_SHORT_STRING ; + v->nv = width == 0 ? 1 : DIV_RND_UP (width, MAX_SHORT_STRING); v->leave = dict_class_from_id (v->name) == DC_SCRATCH; v->index = d->var_cnt; mv_init (&v->miss, width);