X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=9c73e0ea442229bbaa25ad1181ab5d405812e31d;hb=c8ce785f49200ea434e7d2ea65b7eb55bf9f501e;hp=3902f4ced52545155343aba26167afeacdc22d5d;hpb=bc8bf17d5f839d6745eed040b7a28cea22b02ef5;p=pspp diff --git a/src/data/dictionary.c b/src/data/dictionary.c index 3902f4ced5..9c73e0ea44 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -1094,6 +1094,9 @@ make_hinted_name (const struct dictionary *dict, const char *hint) size_t ofs; int mblen; + if (hint_len > ID_MAX_LEN) + hint_len = ID_MAX_LEN; + /* The allocation size here is OK: characters that are copied directly fit OK, and characters that are not copied directly are replaced by a single '_' byte. If u8_mbtouc() replaces bad input by 0xfffd, then that will get @@ -1200,6 +1203,7 @@ dict_make_unique_var_name (const struct dictionary *dict, const char *hint, if (hinted_name != NULL) return hinted_name; } + return make_numeric_name (dict, num_start); } @@ -1795,6 +1799,9 @@ dict_var_changed (const struct variable *v, unsigned int what, struct variable * if (NULL == d) return; + if (what & (VAR_TRAIT_WIDTH | VAR_TRAIT_POSITION)) + invalidate_proto (d); + if (d->changed) d->changed (d, d->changed_data); if (d->callbacks && d->callbacks->var_changed) d->callbacks->var_changed (d, var_get_dict_index (v), what, oldvar, d->cb_data);