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 | 65a011d0c6ce6f142b3c8fcf612d982ba60fa3aa (patch) | |
tree | 33106adbcbe128c9055f6ae172fe4b341ea8b962 /src/core | |
parent | 55a000ca36d546043d6981a73ca90bc21a3ed365 (diff) | |
download | libdom-65a011d0c6ce6f142b3c8fcf612d982ba60fa3aa.tar.gz libdom-65a011d0c6ce6f142b3c8fcf612d982ba60fa3aa.tar.bz2 |
DOMString.replace: Swap source/target in byte counter
Diffstat (limited to 'src/core')
-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; |