# std.Build.Step.Compile: fix clearing logic for empty cflags · gitcafe/zig

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

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

Visibility: public

Requested revision: 8ae92fd17ee9a3d46e4f441864a8544b440c0b2d

Requested commit: 8ae92fd17ee9a3d46e4f441864a8544b440c0b2d

Commit: 8ae92fd17ee9a3d46e4f441864a8544b440c0b2d

Tree: e906abcf860cf86dc0709759bb4c7bd7c5004bc0

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Build.Step.Compile: fix clearing logic for empty cflags

Commit c0b774fbc65e3e406a38d37b02fffda7c5d3df26 originally added this
logic but it did not properly clear the C command line flags to empty
when a previous positional argument had command line flags, because it
never set the "previous" flag to true.

This fixes C compiler flags not being reset to empty when using the
build system and a second positional argument has no arguments after a
first positional argument has arguments.

Thanks to @squeek502 for finding this.

```

## Parents

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

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