Added a bunch of new file natives.

Fixed possible corruption in snprintf when input buffer was bigger than output buffer and relaying on its retval.
Fixed all cases when the above situation happened.
Fixed _PrintToHL2Log not taking va_list in.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40279
This commit is contained in:
Borja Ferrer
2007-01-07 01:30:28 +00:00
parent 7bb52e67f3
commit 45baab94a6
9 changed files with 484 additions and 19 deletions
+2
View File
@@ -289,6 +289,8 @@ void LibrarySystem::PathFormat(char *buffer, size_t len, const char *fmt, ...)
size_t mylen = vsnprintf(buffer, len, fmt, ap);
va_end(ap);
mylen = (mylen >= len) ? (len - 1) : mylen;
for (size_t i=0; i<mylen; i++)
{
if (buffer[i] == PLATFORM_SEP_ALTCHAR)