r17005 - gnucash/trunk/lib/libqof/qof - Pass better size parameter to qof_strftime() to make use of whole buffer.

Andreas Köhler andi5 at cvs.gnucash.org
Mon Mar 3 19:20:07 EST 2008


Author: andi5
Date: 2008-03-03 19:20:07 -0500 (Mon, 03 Mar 2008)
New Revision: 17005
Trac: http://svn.gnucash.org/trac/changeset/17005

Modified:
   gnucash/trunk/lib/libqof/qof/gnc-date.c
Log:
Pass better size parameter to qof_strftime() to make use of whole buffer.


Modified: gnucash/trunk/lib/libqof/qof/gnc-date.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/gnc-date.c	2008-03-03 22:36:02 UTC (rev 17004)
+++ gnucash/trunk/lib/libqof/qof/gnc-date.c	2008-03-04 00:20:07 UTC (rev 17005)
@@ -1395,10 +1395,10 @@
 {
     struct tm my_tm;
     int i;
-    
+
     memset(buf, 0, buf_len);
     memset(&my_tm, 0, sizeof(struct tm));
     my_tm.tm_wday = dow;
-    i = qof_strftime(buf, buf_len - 1, "%a", &my_tm);
+    i = qof_strftime(buf, buf_len, "%a", &my_tm);
     buf[i] = 0;
 }



More information about the gnucash-changes mailing list