Skip to content

Commit

Permalink
libgap: fix GAP_ValueGlobalVariable for automatic vars
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jul 30, 2020
1 parent f6dea83 commit 4a1e458
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/libgap-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,8 @@ Obj GAP_EvalString(const char * cmd)
Obj GAP_ValueGlobalVariable(const char * name)
{
UInt gvar = GVarName(name);
// TODO: GVarName should never return 0?
if (gvar != 0) {
return ValGVar(gvar);
}
else {
return NULL;
}
GAP_ASSERT(gvar != 0);
return ValAutoGVar(gvar);
}

int GAP_CanAssignGlobalVariable(const char * name)
Expand Down

0 comments on commit 4a1e458

Please sign in to comment.