From: ceriel Date: Mon, 21 Aug 1989 17:08:54 +0000 (+0000) Subject: Improved checks for conversion between cardinal and integer X-Git-Tag: release-5-5~2276 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=73246f38248d3c8d79ec3200db410758c826099f;p=ack.git Improved checks for conversion between cardinal and integer --- diff --git a/lang/m2/comp/code.c b/lang/m2/comp/code.c index bad650108..0a5af056e 100644 --- a/lang/m2/comp/code.c +++ b/lang/m2/comp/code.c @@ -643,12 +643,14 @@ RangeCheck(tpl, tpr) genrck(tpl); return; } - if (tpl->tp_size <= tpr->tp_size && - ((tpl->tp_fund == T_INTEGER && tpr == card_type) || - (tpr->tp_fund == T_INTEGER && tpl == card_type))) { + tpr = BaseType(tpr); + if ((tpl->tp_fund == T_INTEGER && tpr == card_type) || + (tpr->tp_fund == T_INTEGER && tpl == card_type)) { label lb = ++text_label; - C_dup(word_size); + C_dup(tpr->tp_size); + C_zer(tpr->tp_size); + C_cmi(tpr->tp_size); C_zge(lb); c_loc(ECONV); C_trp();