Skip to content

Commit

Permalink
fixmultunit
Browse files Browse the repository at this point in the history
  • Loading branch information
freakout42 committed May 11, 2024
1 parent 544ed03 commit ac0f575
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mc/src/mcpary.y
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,12 @@ e : e OR e
$$.unit = NULL;
} else {
$$.value = $1.value * $3.value;
if ($1.unit || $3.unit) {
$$.unit = yybuf;
yybuf = unitmult (yybuf, $1.unit, $3.unit);
} else {
$$.unit = NULL;
}
}
#ifdef DEBUG
fprintf (stderr, "mcpary: %f = %f * %f\n", $$.cimag, $1.cimag, $3.cimag);
Expand Down

0 comments on commit ac0f575

Please sign in to comment.