Blob Blame History Raw
diff -up DBD-Pg-1.49/dbdimp.c.bleble DBD-Pg-1.49/dbdimp.c
--- DBD-Pg-1.49/dbdimp.c.bleble	2006-05-04 04:11:14.000000000 +0200
+++ DBD-Pg-1.49/dbdimp.c	2008-03-11 16:21:18.000000000 +0100
@@ -1542,6 +1542,7 @@ static int dbd_st_prepare_statement (sth
 	}
 	/* Construct the statement, with proper placeholders */
 	for (currseg=imp_sth->seg; NULL != currseg; currseg=currseg->nextseg) {
+		if (currseg->segment != NULL)
 		strcat(statement, currseg->segment);
 		if (currseg->placeholder) {
 			sprintf(strchr(statement, '\0'), "$%d", currseg->placeholder);