You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert(outPtr%2==0,'Pointer passed to stringToUTF16 must be aligned to two bytes!');
725
+
#endif
718
726
#if ASSERTIONS
719
727
assert(typeofmaxBytesToWrite=='number','stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
720
728
#endif
@@ -746,6 +754,9 @@ function lengthBytesUTF16(str) {
746
754
{{{maybeExport('lengthBytesUTF16')}}}
747
755
748
756
functionUTF32ToString(ptr){
757
+
#if ASSERTIONS
758
+
assert(ptr%4==0,'Pointer passed to UTF32ToString must be aligned to four bytes!');
759
+
#endif
749
760
vari=0;
750
761
751
762
varstr='';
@@ -778,6 +789,9 @@ function UTF32ToString(ptr) {
778
789
// Returns the number of bytes written, EXCLUDING the null terminator.
assert(outPtr%4==0,'Pointer passed to stringToUTF32 must be aligned to four bytes!');
794
+
#endif
781
795
#if ASSERTIONS
782
796
assert(typeofmaxBytesToWrite=='number','stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
0 commit comments