From a8799cfee2de8ac53cc07c571c56ae5d9c98cbbd Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 17 Oct 2025 19:02:21 +0200 Subject: model selection for ai service --- src/strops.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/strops.cpp') diff --git a/src/strops.cpp b/src/strops.cpp index d47ec2e..efa91e6 100644 --- a/src/strops.cpp +++ b/src/strops.cpp @@ -143,7 +143,8 @@ namespace strops { const char *pos = strstr(json, pattern); while(skip > 0) { pos = strstr(pos+1, pattern); - skip--; + skip--; + if (!pos) return 0; } if (!pos) return NULL; pos = strchr(pos, ':'); -- cgit v1.2.3-70-g09d2