From: Adam Dickmeiss Date: Thu, 8 Jun 1995 10:26:32 +0000 (+0000) Subject: Bug fix in ir_strdup. X-Git-Tag: IRTCL.1.4~285 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=ccdfb0b1bf6abd6438ee03ec1cd9b19b0bb77df8;hp=dc228e0dad9314fd4345075c0730f09f4377ed9d;p=ir-tcl-moved-to-github.git Bug fix in ir_strdup. --- 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) {