[Libreoffice-commits] .: connectivity/source

Takeshi Abe tabe at kemper.freedesktop.org
Sun May 20 17:56:22 PDT 2012


 connectivity/source/commontools/CommonTools.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f8e94ec86428b8cce9c616e286106c20491ef3e2
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon May 21 09:55:26 2012 +0900

    allocate in exact size
    
    Change-Id: I0a9d760ebd10f3655f116953a2ed353f992ef508

diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 63a31e1..3fbafce 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);
     }
 


More information about the Libreoffice-commits mailing list