summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/parse.c b/parse.c
index f990a69..3e54ef6 100644
--- a/parse.c
+++ b/parse.c
@@ -2388,12 +2388,12 @@ static struct expr *parse_type(struct parser_state *state, int x, int arg2) {
return NULL;
}
- enum bftw_typeflag types = 0;
+ unsigned int types = 0;
double probability = 0.0;
const char *c = expr->sdata;
while (true) {
- enum bftw_typeflag type;
+ enum bftw_type type;
double type_prob;
switch (*c) {
@@ -2444,8 +2444,9 @@ static struct expr *parse_type(struct parser_state *state, int x, int arg2) {
goto fail;
}
- if (!(types & type)) {
- types |= type;
+ unsigned int flag = 1 << type;
+ if (!(types & flag)) {
+ types |= flag;
probability += type_prob;
}