summaryrefslogtreecommitdiff
path: root/src/strops.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-17 19:02:21 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-17 19:02:21 +0200
commita8799cfee2de8ac53cc07c571c56ae5d9c98cbbd (patch)
treebfbff345e11ce8d75b7a86a611367bdc63c6dcfd /src/strops.cpp
parent18b9e47b88ab483b8f6fa0b133519546846fbb5e (diff)
model selection for ai service
Diffstat (limited to 'src/strops.cpp')
-rw-r--r--src/strops.cpp3
1 files changed, 2 insertions, 1 deletions
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, ':');