diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2012-07-05 09:34:42 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2012-07-05 09:34:42 +0100 |
commit | 1d62d9a6f417dc124f33e123c49ea6e5e19fb50a (patch) | |
tree | 33106adbcbe128c9055f6ae172fe4b341ea8b962 /src/core/string.c | |
parent | f7335bec315086c17b952cd83d3709f9c7125c4f (diff) | |
download | libdom-1d62d9a6f417dc124f33e123c49ea6e5e19fb50a.tar.gz libdom-1d62d9a6f417dc124f33e123c49ea6e5e19fb50a.tar.bz2 |
DOMString.replace: Swap source/target in byte counter
Diffstat (limited to 'src/core/string.c')
-rw-r--r-- | src/core/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/string.c b/src/core/string.c index be933f3..aa046ad 100644 --- a/src/core/string.c +++ b/src/core/string.c @@ -764,7 +764,7 @@ dom_exception dom_string_replace(dom_string *target, /* Calculate the byte index of the start */ while (i1 > 0) { - err = parserutils_charset_utf8_next(s, slen, b1, &b1); + err = parserutils_charset_utf8_next(t, tlen, b1, &b1); if (err != PARSERUTILS_OK) { return DOM_NO_MEM_ERR; @@ -778,7 +778,7 @@ dom_exception dom_string_replace(dom_string *target, /* Calculate the byte index of the end */ while (i2 > 0) { - err = parserutils_charset_utf8_next(s, slen, b2, &b2); + err = parserutils_charset_utf8_next(t, tlen, b2, &b2); if (err != PARSERUTILS_OK) { return DOM_NO_MEM_ERR; |