Merge pull request #7445 from kalsprite/target_feature_empty_element

string_split_iterator fix
This commit is contained in:
Jeroen van Rijn
2026-08-24 18:03:35 -07:00
committed by GitHub
6 changed files with 49 additions and 53 deletions

View File

@@ -3164,10 +3164,9 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
gbString llvm_features = gb_string_make(temporary_allocator(), "");
String_Iterator it = {build_context.target_features_string, 0};
String str = {};
bool first = true;
for (;;) {
String str = string_split_iterator(&it, ',');
if (str == "") break;
while (string_split_iterator_next(&it, ',', &str)) {
if (!first) {
llvm_features = gb_string_appendc(llvm_features, ",");
}