Skip to content

Commit

Permalink
Fixed stupid bug by which (qepcad-qe [true]) would crash because the …
Browse files Browse the repository at this point in the history
…input translation doesn't work properly for constant input. Ugh.
  • Loading branch information
chriswestbrown committed Nov 27, 2024
1 parent e8f38c2 commit 9efda3e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions interpreter/src/shell/qepcad-inter/qepcad-inter.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ class CommQepcadQE : public EICommand
bool numLeavesOnlyFlag = false;
char solFormType = 'T';
VarOrderRef ord;

// Do basic normalization to get rid of boolean constants, which qepcad
// doesn't understand.
Level1 basicNormalizer;
RawNormalizer R(basicNormalizer);
R(F);
F = R.getRes();

// Bail out if this is already a constant
{ int tmp = F->constValue(); if (tmp != -1) { return new TarObj(new TConstObj(tmp)); } }


for(int i = 1; i < args.size(); i++)
{
Expand Down

0 comments on commit 9efda3e

Please sign in to comment.