Index: src/uri.js |
diff --git a/src/uri.js b/src/uri.js |
index a2a36cf8c7a82301fea723512cc5f88db8d959fe..88ea75f82d49d376408158e7829cd7ff749fadf7 100644 |
--- a/src/uri.js |
+++ b/src/uri.js |
@@ -172,10 +172,10 @@ |
throw new $URIError("URI malformed"); |
} |
if (value < 0x10000) { |
- %_TwoByteSeqStringSetChar(index++, value, result); |
+ %_TwoByteSeqStringSetChar(result, index++, value); |
} else { |
- %_TwoByteSeqStringSetChar(index++, (value >> 10) + 0xd7c0, result); |
- %_TwoByteSeqStringSetChar(index++, (value & 0x3ff) + 0xdc00, result); |
+ %_TwoByteSeqStringSetChar(result, index++, (value >> 10) + 0xd7c0); |
+ %_TwoByteSeqStringSetChar(result, index++, (value & 0x3ff) + 0xdc00); |
} |
return index; |
} |
@@ -205,7 +205,7 @@ |
var result = %NewString(array.length, NEW_ONE_BYTE_STRING); |
for (var i = 0; i < array.length; i++) { |
- %_OneByteSeqStringSetChar(i, array[i], result); |
+ %_OneByteSeqStringSetChar(result, i, array[i]); |
} |
return result; |
} |
@@ -225,16 +225,16 @@ |
var cc = URIHexCharsToCharCode(uri.charCodeAt(k+1), uri.charCodeAt(k+2)); |
if (cc >> 7) break; // Assumption wrong, two-byte string. |
if (reserved(cc)) { |
- %_OneByteSeqStringSetChar(index++, 37, one_bye); // '%'. |
- %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+1), one_byte); |
- %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+2), one_byte); |
+ %_OneByteSeqStringSetChar(one_byte, index++, 37); // '%'. |
+ %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+1)); |
+ %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+2)); |
} else { |
- %_OneByteSeqStringSetChar(index++, cc, one_byte); |
+ %_OneByteSeqStringSetChar(one_byte, index++, cc); |
} |
k += 2; |
} else { |
if (code > 0x7f) break; // Assumption wrong, two-byte string. |
- %_OneByteSeqStringSetChar(index++, code, one_byte); |
+ %_OneByteSeqStringSetChar(one_byte, index++, code); |
} |
} |
@@ -264,14 +264,14 @@ |
} |
index = URIDecodeOctets(octets, two_byte, index); |
} else if (reserved(cc)) { |
- %_TwoByteSeqStringSetChar(index++, 37, two_byte); // '%'. |
- %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k - 1), two_byte); |
- %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k), two_byte); |
+ %_TwoByteSeqStringSetChar(two_byte, index++, 37); // '%'. |
+ %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k - 1)); |
+ %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k)); |
} else { |
- %_TwoByteSeqStringSetChar(index++, cc, two_byte); |
+ %_TwoByteSeqStringSetChar(two_byte, index++, cc); |
} |
} else { |
- %_TwoByteSeqStringSetChar(index++, code, two_byte); |
+ %_TwoByteSeqStringSetChar(two_byte, index++, code); |
} |
} |