From ccdfb0b1bf6abd6438ee03ec1cd9b19b0bb77df8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 8 Jun 1995 10:26:32 +0000 Subject: [PATCH] Bug fix in ir_strdup. --- ir-tcl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ir-tcl.c b/ir-tcl.c index df3c5dd..ce67ce5 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.38 1995-06-01 16:36:47 adam + * Revision 1.39 1995-06-08 10:26:32 adam + * Bug fix in ir_strdup. + * + * Revision 1.38 1995/06/01 16:36:47 adam * About buttons. Minor bug fixes. * * Revision 1.37 1995/06/01 07:31:20 adam @@ -343,6 +346,11 @@ int ir_named_bits (struct ir_named_entry *tab, Odr_bitmask *ob, */ int ir_strdup (Tcl_Interp *interp, char** p, const char *s) { + if (!s) + { + *p = NULL; + return TCL_OK; + } *p = malloc (strlen(s)+1); if (!*p) { -- 1.7.10.4