summaryrefslogtreecommitdiff
path: root/src/strops.cpp
diff options
context:
space:
mode:
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, ':');