From: Georgi Gerganov Date: Wed, 17 Apr 2024 09:23:47 +0000 (+0300) Subject: main : pass nullptr when regex is empty (#2070) X-Git-Tag: upstream/1.7.4~831 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=b0c3cbf2e851cf232e432b590dcc514a689ec028;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp main : pass nullptr when regex is empty (#2070) --- diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 6f490e3e..15d8c8a8 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -1068,7 +1068,7 @@ int main(int argc, char ** argv) { wparams.tdrz_enable = params.tinydiarize; // [TDRZ] - wparams.suppress_regex = params.suppress_regex.c_str(); + wparams.suppress_regex = params.suppress_regex.empty() ? nullptr : params.suppress_regex.c_str(); wparams.initial_prompt = params.prompt.c_str();