diff options
| author | Tyge Løvset <[email protected]> | 2021-05-10 17:41:03 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-05-10 17:41:03 +0200 |
| commit | 1401833dbfc8a08bf94978e98c76904aa82d3878 (patch) | |
| tree | 4867e1b19c0705492cba7d56eefae0ab006a681f /stc | |
| parent | aa3851a95e700bb391eec1610d3b99aca97faaa8 (diff) | |
| download | STC-modified-1401833dbfc8a08bf94978e98c76904aa82d3878.tar.gz STC-modified-1401833dbfc8a08bf94978e98c76904aa82d3878.zip | |
added multimap example.
Diffstat (limited to 'stc')
| -rw-r--r-- | stc/cstr.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -320,6 +320,7 @@ cstr_replace_all(cstr* self, const char* find, const char* replace) { cstr_append(&out, replace);
from = pos + find_len; ++n;
}
+ if (!n) return 0;
cstr_append(&out, self->str + from);
cstr_del(self); *self = out;
return n;
|
