diff options
-rw-r--r-- | ACE/ChangeLog | 6 | ||||
-rw-r--r-- | ACE/apps/gperf/src/Key_List.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 4e6a19a4756..f932858d6b4 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,9 @@ +Tue May 12 12:35:07 UTC 2009 Vladimir Zykov <vz@prismtech.com> + + * apps/gperf/src/Key_List.cpp: + + Fixed an incorrect check which resulted in valgrind warning. + Tue May 12 08:31:05 2009 Johnny Willemsen <jwillemsen@remedy.nl> * ace/OS_NS_errno.h: diff --git a/ACE/apps/gperf/src/Key_List.cpp b/ACE/apps/gperf/src/Key_List.cpp index 34c0f4f49f7..407265728f3 100644 --- a/ACE/apps/gperf/src/Key_List.cpp +++ b/ACE/apps/gperf/src/Key_List.cpp @@ -234,10 +234,10 @@ Key_List::output_types (void) ACE_OS::strncpy (struct_tag, array_type_, struct_tag_length); - if (struct_tag[struct_tag_length] != ' ') + if (struct_tag[struct_tag_length - 1] != ' ') { struct_tag[struct_tag_length] = ' '; - struct_tag_length++; + ++struct_tag_length; } struct_tag[struct_tag_length] = '\0'; } |