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);
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();