Skip to content

Commit b0c3cbf

Browse files
authored
main : pass nullptr when regex is empty (ggml-org#2070)
1 parent a750868 commit b0c3cbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ int main(int argc, char ** argv) {
10681068

10691069
wparams.tdrz_enable = params.tinydiarize; // [TDRZ]
10701070

1071-
wparams.suppress_regex = params.suppress_regex.c_str();
1071+
wparams.suppress_regex = params.suppress_regex.empty() ? nullptr : params.suppress_regex.c_str();
10721072

10731073
wparams.initial_prompt = params.prompt.c_str();
10741074

0 commit comments

Comments
 (0)