build.zig: Fix a minor issue with -Dconfig (#4418)

This commit is contained in:
Sage Hane 2024-10-23 01:31:26 +09:00 committed by GitHub
parent 55249faa58
commit 53f7da2506
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,6 +116,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
// `n` corresponds to the number of user-specified flags
outer: for (config_h_flags) |flag| {
// If a user already specified the flag, skip it
config_iter.reset();
while (config_iter.next()) |config_flag| {
// For a user-specified flag to match, it must share the same prefix and have the
// same length or be followed by an equals sign