# Make LinearFifo not crash when discarding from empty buffer · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/eab51b7785ce0989f90a5cdde4b1110f40875ddb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: eab51b7785ce0989f90a5cdde4b1110f40875ddb

Requested commit: eab51b7785ce0989f90a5cdde4b1110f40875ddb

Commit: eab51b7785ce0989f90a5cdde4b1110f40875ddb

Tree: df0772f5d0911f497ccd14fb980a4c225f99b0d8

Author: Ian Simonson

Committer: Andrew Kelley

## Message

```
Make LinearFifo not crash when discarding from empty buffer

Previously if a LinearFifo was empty and discard was called
an unsigned overflow would occur. However it is safe to perform
this overflow as a bitwise & operation with 0xFFFFFFFFFFFFFF is a noop

```

## Parents

- [ed357f9897a6c96a1744307b1bc75a370dd85461](https://git.cafe/gitcafe/zig/commit/ed357f9897a6c96a1744307b1bc75a370dd85461?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/eab51b7785ce0989f90a5cdde4b1110f40875ddb?format=markdown)
