Updated.
committer: mfx <mfx> 1043211831 +0000
This commit is contained in:
+12
-5
@@ -177,11 +177,18 @@ void throwEOFException(const char *msg, int e)
|
|||||||
const char *prettyName(const char *n)
|
const char *prettyName(const char *n)
|
||||||
{
|
{
|
||||||
if (n == NULL)
|
if (n == NULL)
|
||||||
return "";
|
return "(null)";
|
||||||
while (*n >= '0' && *n <= '9') // gcc
|
while (*n)
|
||||||
n++;
|
{
|
||||||
if (strncmp(n, "class ", 6) == 0) // Visual C++
|
if (*n >= '0' && *n <= '9') // Linux ABI
|
||||||
n += 6;
|
n++;
|
||||||
|
else if (*n == ' ')
|
||||||
|
n++;
|
||||||
|
else if (strncmp(n, "class ", 6) == 0) // Visual C++
|
||||||
|
n += 6;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -775,6 +775,7 @@ static int xdopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
size_t ret;
|
size_t ret;
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
|
assert(maxlen < INT_MAX);
|
||||||
if (buffer != NULL)
|
if (buffer != NULL)
|
||||||
assert((int)maxlen > 0);
|
assert((int)maxlen > 0);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user