diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-17 19:02:21 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-17 19:02:21 +0200 |
| commit | a8799cfee2de8ac53cc07c571c56ae5d9c98cbbd (patch) | |
| tree | bfbff345e11ce8d75b7a86a611367bdc63c6dcfd /src/strops.cpp | |
| parent | 18b9e47b88ab483b8f6fa0b133519546846fbb5e (diff) | |
model selection for ai service
Diffstat (limited to 'src/strops.cpp')
| -rw-r--r-- | src/strops.cpp | 3 |
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, ':'); |
