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:
scc%mozilla.org 2000-05-21 01:45:19 +00:00
Родитель 8254c9cbf3
Коммит e16c3964fe
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
typedef basic_nsLiteralString<PRUnichar> nsLiteralString; typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
typedef basic_nsLiteralString<char> nsLiteralCString; typedef basic_nsLiteralString<char> nsLiteralCString;
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t)) #define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)) #define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
typedef basic_nsLiteralChar<char> nsLiteralChar; typedef basic_nsLiteralChar<char> nsLiteralChar;
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar; typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;

Просмотреть файл

@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
typedef basic_nsLiteralString<PRUnichar> nsLiteralString; typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
typedef basic_nsLiteralString<char> nsLiteralCString; typedef basic_nsLiteralString<char> nsLiteralCString;
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t)) #define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)) #define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
typedef basic_nsLiteralChar<char> nsLiteralChar; typedef basic_nsLiteralChar<char> nsLiteralChar;
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar; typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;

Просмотреть файл

@ -1230,8 +1230,8 @@ typedef basic_nsAReadableString<char> nsAReadableCString;
typedef basic_nsLiteralString<PRUnichar> nsLiteralString; typedef basic_nsLiteralString<PRUnichar> nsLiteralString;
typedef basic_nsLiteralString<char> nsLiteralCString; typedef basic_nsLiteralString<char> nsLiteralCString;
#define NS_LITERAL_STRING(s) nsLiteralString(s, sizeof(s)/sizeof(wchar_t)) #define NS_LITERAL_STRING(s) nsLiteralString(s, (sizeof(s)/sizeof(wchar_t))-1)
#define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)) #define NS_LITERAL_CSTRING(s) nsLiteralCString(s, sizeof(s)-1)
typedef basic_nsLiteralChar<char> nsLiteralChar; typedef basic_nsLiteralChar<char> nsLiteralChar;
typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar; typedef basic_nsLiteralChar<PRUnichar> nsLiteralPRUnichar;