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 23, 2020
1 parent 17970e9 commit 084b640
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 @@ -93,13 +93,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 084b640

Please sign in to comment.