mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
replace even if in middle of string
This commit is contained in:
parent
2c098b35a4
commit
a9cb14668e
1 changed files with 0 additions and 6 deletions
|
@ -449,14 +449,8 @@ int main(int argc, char *argv[]) {
|
||||||
struct Param *param = &(params.p[i]);
|
struct Param *param = &(params.p[i]);
|
||||||
for (param->roloc = NEXT_ROLOC(param); param->roloc != NULL;
|
for (param->roloc = NEXT_ROLOC(param); param->roloc != NULL;
|
||||||
param->roloc = NEXT_ROLOC(param)) {
|
param->roloc = NEXT_ROLOC(param)) {
|
||||||
if (param->roloc == rostart ||
|
|
||||||
param->roloc[-1] == '\0') { // confirm start of string
|
|
||||||
ReplaceString(param);
|
ReplaceString(param);
|
||||||
param->count++;
|
param->count++;
|
||||||
} else {
|
|
||||||
// in the middle of a string, so move forward
|
|
||||||
param->roloc += param->from_len;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#undef NEXT_ROLOC
|
#undef NEXT_ROLOC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue