Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/memory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@
function(a,b)
local slp;
slp := a!.slp;
if a!.n = 0 then
return ObjWithMemory( slp, 0, a!.el );
if a!.n = 0 or b = 0 then
return ObjWithMemory( slp, 0, a!.el^0 );

Check warning on line 232 in lib/memory.gi

View check run for this annotation

Codecov / codecov/patch

lib/memory.gi#L232

Added line #L232 was not covered by tests
elif b = 1 then
return a;

Check warning on line 234 in lib/memory.gi

View check run for this annotation

Codecov / codecov/patch

lib/memory.gi#L234

Added line #L234 was not covered by tests
else
Add( slp.prog, [ a!.n, b ] );
return ObjWithMemory( slp, Length( slp.prog ) + slp.nogens, a!.el^b );
Expand Down
Loading