Improved checks for conversion between cardinal and integer

This commit is contained in:
ceriel 1989-08-21 17:08:54 +00:00
parent 360caa08bb
commit 73246f3824

View file

@ -643,12 +643,14 @@ RangeCheck(tpl, tpr)
genrck(tpl); genrck(tpl);
return; return;
} }
if (tpl->tp_size <= tpr->tp_size && tpr = BaseType(tpr);
((tpl->tp_fund == T_INTEGER && tpr == card_type) || if ((tpl->tp_fund == T_INTEGER && tpr == card_type) ||
(tpr->tp_fund == T_INTEGER && tpl == card_type))) { (tpr->tp_fund == T_INTEGER && tpl == card_type)) {
label lb = ++text_label; 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_zge(lb);
c_loc(ECONV); c_loc(ECONV);
C_trp(); C_trp();