- Added textual descriptions of the zlib errors.

SVN r3689 (trunk)
This commit is contained in:
Randy Heit 2012-06-16 03:29:44 +00:00
commit 08272a29ad
6 changed files with 39 additions and 5 deletions

View file

@ -780,3 +780,33 @@ CCMD (screenshot)
else
G_ScreenShot (argv[1]);
}
//
// M_ZlibError
//
FString M_ZLibError(int zerr)
{
if (zerr >= 0)
{
return "OK";
}
else if (zerr < -6)
{
FString out;
out.Format("%d", zerr);
return out;
}
else
{
static const char *errs[6] =
{
"Errno",
"Stream Error",
"Data Error",
"Memory Error",
"Buffer Error",
"Version Error"
};
return errs[-zerr - 1];
}
}