public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7913b68
)
bug fix: casts of constants to a set type caused memory fault
author
ceriel
<none@none>
Thu, 18 Jan 1990 10:12:38 +0000
(10:12 +0000)
committer
ceriel
<none@none>
Thu, 18 Jan 1990 10:12:38 +0000
(10:12 +0000)
lang/m2/comp/chk_expr.c
patch
|
blob
|
history
diff --git
a/lang/m2/comp/chk_expr.c
b/lang/m2/comp/chk_expr.c
index
02c8314
..
8e7f30c
100644
(file)
--- a/
lang/m2/comp/chk_expr.c
+++ b/
lang/m2/comp/chk_expr.c
@@
-1415,6
+1415,13
@@
ChkCast(expp)
if (arg->nd_class == Value) {
*expp = *arg;
free_node(arg);
+ if (lefttype->tp_fund == T_SET) {
+ /* User deserves what he gets here ... */
+ arith val = expp->nd_INT;
+
+ expp->nd_set = MkSet((unsigned)(lefttype->tp_size));
+ expp->nd_set[0] = val;
+ }
}
else {
expp->nd_symb = CAST;