Fixed a cast bug (unsigned to unsigned char)

This commit is contained in:
ceriel 1991-05-13 10:08:54 +00:00
parent 1da2103504
commit d8d30b403b

View file

@ -38,8 +38,7 @@ conversion(from_type, to_type)
int to_cnvtype = convtype(to_type);
if ((int)to_size < (int)word_size) to_size = word_size;
if ((int)from_size == (int)to_size && from_cnvtype == to_cnvtype)
return;
if ((int)from_size != (int)to_size || from_cnvtype != to_cnvtype) {
switch (from_cnvtype) {
case T_SIGNED:
switch (to_cnvtype) {
@ -106,6 +105,7 @@ conversion(from_type, to_type)
crash("(conversion) illegal type conversion");
/*NOTREACHED*/
}
}
if ((int)(to_type->tp_size) < (int)word_size
&& to_cnvtype != T_FLOATING
) {