summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_stdio.inl
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2009-10-04 14:26:19 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2009-10-04 14:26:19 +0000
commit27952f637bfae0535ffced91c774660deb5455a1 (patch)
treebba71ada89a301034b14f5d40e3a18b63be8e174 /ACE/ace/OS_NS_stdio.inl
parent8c890e50d9b7c682f4c87ba743a86f395e61e719 (diff)
downloadATCD-27952f637bfae0535ffced91c774660deb5455a1.tar.gz
ChangeLogTag:Sun
Diffstat (limited to 'ACE/ace/OS_NS_stdio.inl')
-rw-r--r--ACE/ace/OS_NS_stdio.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index ea25dd6cc3d..1d22567d799 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -1053,7 +1053,7 @@ ACE_OS::vsnprintf (char *buffer, size_t maxlen, const char *format, va_list ap)
result = ::_vsnprintf (buffer, maxlen, format, ap);
// Win32 doesn't regard a full buffer with no 0-terminate as an overrun.
- if (result == static_cast<int> (maxlen))
+ if (result == static_cast<int> (maxlen) && maxlen > 0)
buffer[maxlen-1] = '\0';
// Win32 doesn't 0-terminate the string if it overruns maxlen.