some minor corrections

This commit is contained in:
ceriel
1989-06-19 09:56:16 +00:00
parent bf9b3eb667
commit 7bdc0856dc
4 changed files with 5 additions and 5 deletions

View File

@@ -5,4 +5,4 @@ sed "s/\.$VERSION/.$NEWVERSION/" < Version.c > tmp$$
mv tmp$$ Version.c
CM "$*"
V=`cat Version.c`
SV > ../versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`
SV > Versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`

View File

@@ -584,11 +584,12 @@ ArraySizes(tp)
getbounds(index_type, &(tp->arr_low), &(tp->arr_high));
diff = tp->arr_high - tp->arr_low;
if (! fit(diff, (int) int_size)) {
if (diff < 0 || ! fit(diff, (int) int_size)) {
error("too many elements in array");
}
tp->tp_size = align((diff + 1) * tp->arr_elsize, tp->tp_align);
/* ??? check overflow ??? */
if (! ufit(tp->tp_size, (int) pointer_size)) {
error("array too large");
}