changeset 360:721b3563d92c

Only strchr if it's not NULL
author mmj
date Fri, 12 Nov 2004 00:31:22 +1100
parents ca217febcfbd
children 080cbf6c2721
files src/prepstdreply.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/prepstdreply.c	Fri Nov 12 00:10:54 2004 +1100
+++ b/src/prepstdreply.c	Fri Nov 12 00:31:22 2004 +1100
@@ -47,7 +47,10 @@
 	size_t len, i;
 	
 	d1 = strchr(origline, '$');
+	if(d1)
 	d2 = strchr(d1 + 1, '$');
+	else
+		d2 = NULL;
 	
 	if(d1 && d2) {
 		len = d2 - d1;