Skip to content

Commit

Permalink
Fix some errors which didn't trigger a break loop anymore
Browse files Browse the repository at this point in the history
Specifically use ErrorMayQuit instead of ErrorQuit in CheckIsPossList and
CheckIsDenseList to ensure this produces a break loop again:

    f:=function()
    local a,v;
      a:=[1.2,3];
      v:=2;
      v:=a{v};
    end;
    f();

Fixes gap-system#3011
  • Loading branch information
fingolfin committed Nov 16, 2018
1 parent dee26aa commit da7f863
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void ErrorMayQuit(const Char * msg, Int arg1, Int arg2)
void CheckIsPossList(const Char * desc, Obj poss)
{
if ( ! IS_POSS_LIST( poss ) ) {
ErrorQuit("%s: <positions> must be a dense list of positive integers",
ErrorMayQuit("%s: <positions> must be a dense list of positive integers",
(Int)desc, 0 );
}
}
Expand All @@ -560,7 +560,7 @@ void CheckIsPossList(const Char * desc, Obj poss)
void CheckIsDenseList(const Char * desc, const Char * listName, Obj list)
{
if (!IS_DENSE_LIST(list)) {
ErrorQuit("%s: <%s> must be a dense list", (Int)desc, (Int)listName);
ErrorMayQuit("%s: <%s> must be a dense list", (Int)desc, (Int)listName);
}
}

Expand Down

0 comments on commit da7f863

Please sign in to comment.