From ddf69c5000c3a56a397d9f5d86ef35e51bd57283 Mon Sep 17 00:00:00 2001 From: Eduardo Fiss Beloni Date: Wed, 30 Apr 2014 15:25:32 -0300 Subject: [PATCH] time_eFormat_TimeAndDate size fix --- src/lib/rt/src/rt_gdh.c | 1 + xtt/lib/ge/src/ge_dyn.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/rt/src/rt_gdh.c b/src/lib/rt/src/rt_gdh.c index 3d6f8be..d9044a8 100644 --- a/src/lib/rt/src/rt_gdh.c +++ b/src/lib/rt/src/rt_gdh.c @@ -4690,6 +4690,7 @@ pwr_tStatus gdh_AttrValueToString( // Format %6t, time before to date sts = time_AtoAscii( (pwr_tTime *) value_ptr, time_eFormat_TimeAndDate, timstr, sizeof(timstr)); + timstr[17] = 0; break; default: sts = time_AtoAscii( (pwr_tTime *) value_ptr, time_eFormat_DateAndTime, diff --git a/xtt/lib/ge/src/ge_dyn.cpp b/xtt/lib/ge/src/ge_dyn.cpp index 00d6a63..8d0d231 100644 --- a/xtt/lib/ge/src/ge_dyn.cpp +++ b/xtt/lib/ge/src/ge_dyn.cpp @@ -4092,7 +4092,7 @@ int GeValue::scan( grow_tObject object) // Format %6t, 01:00:00 30/01/87 sts = time_AtoAscii( &val, time_eFormat_TimeAndDate, timstr, sizeof(timstr)); - timstr[8] = 0; + timstr[17] = 0; break; default: sts = time_AtoAscii( &val, time_eFormat_DateAndTime, @@ -8218,7 +8218,7 @@ int GeTable::scan( grow_tObject object) // Format %6t, 01:00:00 30/01/87 sts = time_AtoAscii( (pwr_tTime *) headerref_p[i][j], time_eFormat_TimeAndDate, timstr, sizeof(timstr)); - timstr[8] = 0; + timstr[17] = 0; break; default: sts = time_AtoAscii( (pwr_tTime *) headerref_p[i][j], time_eFormat_DateAndTime, @@ -8381,7 +8381,7 @@ int GeTable::scan( grow_tObject object) // Format %6t, 01:00:00 30/01/87 sts = time_AtoAscii( (pwr_tTime *) p[i] + offs, time_eFormat_TimeAndDate, timstr, sizeof(timstr)); - timstr[8] = 0; + timstr[17] = 0; break; default: sts = time_AtoAscii( (pwr_tTime *)(p[i] + offs), time_eFormat_DateAndTime, -- 1.7.4.1