зеркало из https://github.com/mozilla/pjs.git
Bugzilla Bug 255633: allow hyphen (-) and underscore (_) in log module
names. The patch is contributed by Ed Catmur <ed@catmur.co.uk>. r=wtc.
This commit is contained in:
Родитель
07c869f8ce
Коммит
7d2b0e0b7e
|
@ -219,7 +219,7 @@ void _PR_InitLog(void)
|
|||
PRInt32 bufSize = DEFAULT_BUF_SIZE;
|
||||
while (pos < evlen) {
|
||||
PRIntn level = 1, count = 0, delta = 0;
|
||||
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n",
|
||||
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
|
||||
module, &delta, &level, &delta);
|
||||
pos += delta;
|
||||
if (count == 0) break;
|
||||
|
@ -328,7 +328,7 @@ static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm )
|
|||
while (pos < evlen) {
|
||||
PRIntn level = 1, count = 0, delta = 0;
|
||||
|
||||
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n",
|
||||
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
|
||||
module, &delta, &level, &delta);
|
||||
pos += delta;
|
||||
if (count == 0) break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче