summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-05-21 09:55:26 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-05-21 09:56:06 +0900
commitf8e94ec86428b8cce9c616e286106c20491ef3e2 (patch)
treef97d41d8687b8ccf7c9be7f7819d0190b059d4da /connectivity
parent67ff63988f3b8eef2cc2b5bdf917918b93c3f070 (diff)
allocate in exact size
Change-Id: I0a9d760ebd10f3655f116953a2ed353f992ef508
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 63a31e1a1f78..3fbafceaef95 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -147,7 +147,7 @@ namespace connectivity
//------------------------------------------------------------------
rtl::OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime)
{
- sal_Char s[21];
+ sal_Char s[20];
snprintf(s,
sizeof(s),
"%04d-%02d-%02d %02d:%02d:%02d",
@@ -157,7 +157,7 @@ namespace connectivity
(int)rDateTime.Hours,
(int)rDateTime.Minutes,
(int)rDateTime.Seconds);
- s[20] = 0;
+ s[19] = 0;
return rtl::OUString::createFromAscii(s);
}