зеркало из https://github.com/mozilla/pjs.git
Bug #39963. The NS_LITERAL_[C]STRING macros incorrectly counted the null terminator for a literal string in the length. This may not be the complete solution. r=sdagley
This commit is contained in:
Родитель
8254c9cbf3
Коммит
e16c3964fe
|
@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
|
|||
typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
|
||||
typedef basic_nsLiteralString<char> nsLiteralCString;
|
||||
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t))
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s))
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
|
||||
|
||||
typedef basic_nsLiteralChar<char> nsLiteralChar;
|
||||
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;
|
||||
|
|
|
@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
|
|||
typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
|
||||
typedef basic_nsLiteralString<char> nsLiteralCString;
|
||||
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t))
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s))
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
|
||||
|
||||
typedef basic_nsLiteralChar<char> nsLiteralChar;
|
||||
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;
|
||||
|
|
|
@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
|
|||
typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
|
||||
typedef basic_nsLiteralString<char> nsLiteralCString;
|
||||
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t))
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s))
|
||||
#define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
|
||||
|
||||
typedef basic_nsLiteralChar<char> nsLiteralChar;
|
||||
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;
|
||||
|
|
Загрузка…
Ссылка в новой задаче