Add new string natives/stocks, make some UTF-8 safe (bug 6110, r=ds)
This commit is contained in:
@@ -163,6 +163,13 @@ public:
|
||||
*out='\0';
|
||||
}
|
||||
|
||||
/* Don't truncate a multi-byte character */
|
||||
if (*(output - 1) & 1 << 7)
|
||||
{
|
||||
size = UTIL_CheckValidChar(output - 1);
|
||||
*(output - size) = '\0';
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
// Returns 1 on success
|
||||
|
Reference in New Issue
Block a user