#! /bin/sh /usr/share/dpatch/dpatch-run
## 11macros_avoid_segfault.dpatch by <hesso@pool.math.tu-berlin.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix the checks of the s parameter, which comes from astr and may
## DP: perfectly be NULL.

@DPATCH@
--- mrxvt-0.5.2_orig/src/macros.c	2007-07-20 23:55:13.000000000 +0200
+++ mrxvt-0.5.2/src/macros.c	2007-07-20 23:55:33.000000000 +0200
@@ -1175,7 +1175,7 @@
 		    linecont	= 1;
 
 
-	    if( *s && *s == '-' )
+	    if( s && *s == '-' )
 	    {
 		while( *(++s) && !isspace( *s ) )
 		{
@@ -1195,7 +1195,7 @@
 	    }
 
 	    rxvt_scr_printscreen( r, ATAB(r), scrollback, pretty, linecont,
-		    *s ? s : NULL );
+		    s );
 
 	    break;
 	}
