aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/ecpg.header
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.header')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index ccd1aec898f..ae3f7fa620a 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.3 2008/11/26 08:45:12 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.4 2008/12/29 17:07:05 meskes Exp $ */
/* Copyright comment */
%{
@@ -111,7 +111,8 @@ cat2_str(char *str1, char *str2)
char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
strcpy(res_str, str1);
- strcat(res_str, " ");
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
strcat(res_str, str2);
free(str1);
free(str2);