X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcompute.c;h=2152b6db1a71e5addcd30cad2a56b2c1860656f4;hb=b7e33825d30a18360f24a18faf4b7d2e9efb8142;hp=e6afe0b62d7e76383f54f524cfbec587a5058a66;hpb=d807ad29cc0d3caa4f0e04ee4b75c70a225cfeaf;p=pspp diff --git a/src/compute.c b/src/compute.c index e6afe0b62d..2152b6db1a 100644 --- a/src/compute.c +++ b/src/compute.c @@ -310,7 +310,7 @@ compute_trns_free (struct trns_header *compute_) /* COMPUTE or IF target variable or vector element. */ struct lvalue { - char var_name[9]; /* Destination variable name, or "". */ + char var_name[LONG_NAME_LEN + 1]; /* Destination variable name, or "". */ const struct vector *vector; /* Destination vector, if any, or NULL. */ struct expression *element; /* Destination vector element, or NULL. */ }; @@ -353,8 +353,8 @@ lvalue_parse (void) else { /* Variable name. */ - strncpy (lvalue->var_name, tokid, 8); - lvalue->var_name[8] = '\0'; + strncpy (lvalue->var_name, tokid, LONG_NAME_LEN); + lvalue->var_name[LONG_NAME_LEN] = '\0'; lex_get (); } return lvalue;