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
commit364d29a9d09652cc83795fa8781d5884305d728c (patch)
treebba71ada89a301034b14f5d40e3a18b63be8e174 /ACE/ace/OS_NS_stdio.inl
parent40968648b026afc02a9510e77efe7c0b00c070f1 (diff)
downloadATCD-364d29a9d09652cc83795fa8781d5884305d728c.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.