File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ if [ "$#" -ne 1 ]; then
7
7
fi
8
8
9
9
CRASHDUMPS_DIR=" $1 "
10
- SUS_COMPILER=" /home/lennart/Desktop/sus-compiler/target/release/sus_compiler"
10
+ cargo build
11
+ SUS_COMPILER=" /home/lennart/Desktop/sus-compiler/target/debug/sus_compiler"
11
12
12
13
if [ ! -d " $CRASHDUMPS_DIR " ]; then
13
14
echo " Directory $CRASHDUMPS_DIR does not exist."
Original file line number Diff line number Diff line change @@ -171,14 +171,20 @@ fn recurse_down_expression(
171
171
Some ( left_v)
172
172
}
173
173
}
174
- BinaryOperator :: Divide => ( left_v. is_const ( ) && right_v. is_const ( ) ) . then ( || {
175
- left_v. const_factor /= right_v. const_factor ;
176
- left_v
177
- } ) ,
178
- BinaryOperator :: Modulo => ( left_v. is_const ( ) && right_v. is_const ( ) ) . then ( || {
179
- left_v. const_factor %= right_v. const_factor ;
180
- left_v
181
- } ) ,
174
+ BinaryOperator :: Divide => ( left_v. is_const ( )
175
+ && right_v. is_const ( )
176
+ && right_v. const_factor != 0 )
177
+ . then ( || {
178
+ left_v. const_factor /= right_v. const_factor ;
179
+ left_v
180
+ } ) ,
181
+ BinaryOperator :: Modulo => ( left_v. is_const ( )
182
+ && right_v. is_const ( )
183
+ && right_v. const_factor != 0 )
184
+ . then ( || {
185
+ left_v. const_factor %= right_v. const_factor ;
186
+ left_v
187
+ } ) ,
182
188
_other => None ,
183
189
}
184
190
}
You can’t perform that action at this time.
0 commit comments