changeset 1413:de4ea465c1be draft

Don't null terminate gratuitously when handling quotes.
author Roy Marples <roy@marples.name>
date Mon, 07 Sep 2009 21:05:46 +0000
parents 039d829277e3
children f080d1b9a933
files if-options.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/if-options.c	Fri Sep 04 23:27:53 2009 +0000
+++ b/if-options.c	Mon Sep 07 21:05:46 2009 +0000
@@ -258,8 +258,10 @@
 		} else
 			*sbuf++ = *str++;
 	}
-	if (punt_last)
+	if (punt_last) {
 		*--sbuf = '\0';
+		l--;
+	}
 	return l;
 }